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] Implementing IAP flow fails on TestFlight and auto-crashes the app on start if app hasn't been approved yet #2722

Open
klaw91 opened this issue Apr 7, 2024 · 0 comments

Comments

@klaw91
Copy link

klaw91 commented Apr 7, 2024

Please use the Discussion board if you want to get some help. Please use issues to report bugs.

Description

I have implemented the full IAP flow through Android first. That has gone pretty seamless and it was successfully integrated.

Now I'm moving over to IOS. I have all my relevant IAP code, and when submitting the app with all the same code for the very initial build of the app that's uploaded to the app store, the app will always instantly crash.

I suspect it is because I have not yet uploaded an approved build to the IOS store yet. I had to comment out all of the IAP code in order for the app to successfully build through. I did not remove the react-native-iap package, I simply commented out all of the IAP relevant code and it successfully passed the build.

Expected Behavior

I expect the build to work regardless if it is the very first build that I'm uploading to the IOS app store. It should gracefully fail and not cause the entire app to crash instantly if there are no valid IAP or the app has not yet been approved.

Screenshots

Environment:

  • react-native-iap: 12.13.1

Prod environment. This has always worked on the dev environment, meaning, all my testing did not catch this bug during development testing on a physical IOS device (iPad + iPhone). It only failed on the production build that was uploaded to the app store.

  • react-native: 0.73.6
  • Platforms (iOS, Android, emulator, simulator, device): tested on IOS only on device (iPad + iPhone)

To Reproduce
Steps to reproduce the behavior:

  1. Create a new project
  2. Build all the IAP flows in, I called
    initConnection,
    endConnection,
    flushFailedPurchasesCachedAsPendingAndroid,
    purchaseUpdatedListener,
    purchaseErrorListener,
    finishTransaction,
    getAvailablePurchases,
    getProducts,
  3. Upload build to TestFlight. (this build will work on test environment. This was not reproducible in dev environment)
  4. Download the build from TestFlight
  5. Open the app, it will instantly crash the app.

[Optional] Additional Context

Important: This only failed on the INITIAL app submission, and only reproducible when the app was downloaded from prod (TestFlight). This was not reproducible when testing in a dev environment (via xcode + vscode).

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

1 participant