Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] [StoreKit2] getAvailablePurchases() depends strictly on getSubscriptions() ? #2890

Open
ngdbao opened this issue Dec 4, 2024 · 1 comment

Comments

@ngdbao
Copy link

ngdbao commented Dec 4, 2024

Since migrated to StoreKit2.
I have to make sure did call getSubscriptions() DONE, before call getAvailablePurchases(), or it will return empty []. Is this expected?

I also find out if an user was in subscribed with sku: abc
When

        getSubscriptions({
          skus: [abc, xyz],
        }),

then getAvailablePurchases() works

but

if

        getSubscriptions({
          skus: [xyz], // removed abc
        }),

then getAvailablePurchases() return empty [], that causing my client (subscribed to abc) lost their subscription unexpectedly

Expected Behavior

getAvailablePurchases() should returns all available purchase (consumable, non-consumable,..) regardless of it's in array sku or not.

Environment:

  • react-native-iap: 12.15.7
  • react-native: expo 51
  • Platforms (iOS, Android, emulator, simulator, device): iOS production and sandbox
@cbjs
Copy link

cbjs commented Jan 9, 2025

same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants