question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getProducts & getSubscriptions returning both products and subscriptions

See original GitHub issue

Version of react-native-iap

5.0.1

Version of react-native

0.61.5

Platforms you faced the error (IOS or Android or both?)

iOS

Behavior

Unlike the naming and the documentation states, getProducts & getSubscriptions are returning both products and subscriptions.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rusakoviccommented, Mar 29, 2021

Fixed in 6.0.1 version. Issue could be closed

1reaction
rwichmanncommented, Nov 11, 2020

I can confirm this on iOS with version 4.6.3.

My observation: If you fetch subscriptions with RNIap.getSubscriptions(['id1', 'id2']) You will get the same subscriptions when calling RNIap.getProducts([]) with an empty array.

So filtering product IDs for fetching does not solve the issue. You will need to filter the results after fetching.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native IAP getSubscriptions returns empty array for iOS
I am following this library to implement In App Purchase for react native project. Project info:- inside package.json "dependencies": { "react": ...
Read more >
react-native-iap - npm
Subscribable products can be purchased just like consumable products. Users can cancel subscriptions by using the iOS System Settings.
Read more >
modules - React Native IAP - dooboolab
Deep link to subscriptions screen on Android. No-op on iOS. Parameters​. Name, Type, Description. sku, Object, The product's ...
Read more >
Recharge API Reference - List subscriptions
Products, GET /products ... GET /subscriptions/:id, subscription/activated ... This header contains both a next_cursor and previous_cursor link, ...
Read more >
React Native In-App Purchases (Android) - YouTube
... to fully working purchases with backend receipt validation and also how to set up test users to purchase the subscription.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found