react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

[iOS] System offer redemption UI does not dismiss after success. ( presentCodeRedemptionSheetIOS )

Open curiousdustin opened this issue 1 year ago • 7 comments

Description

This is occurring in production environment (live app on the iOS App Store), using a Custom Offer Code.

The offer code redemption UI is displayed as expected when calling presentCodeRedemptionSheetIOS(). After the user enters a code, the UI proceeds to the next screen which shows an icon, offer title, and offer details such as 3 months free, then $X/month, and a blue Redeem Offer button. When the user presses Redeem Offer, the smaller confirmation UI is shown as expected. The user presses another Redeem button to confirm the terms, and then the password/biometric confirmation screen is shown. After confirming identity, the circled blue check mark with Done is shown on the smaller confirmation dialog, as expected, and then dismissed.

At this point, the offer code redemption overlay is still showing on the screen overlayed on the main app. Over that, for a few seconds, a faded overlay with a loading indicator is shown, then fades out, leaving the offer code redemption UI in the same state it was before pressing Redeem Offer.

The redemption/checkout process was successful, however, this overlay never dismisses.

There is a cancel button, but this doesn't make any sense for a user to press. If they do, the UI is dismissed, and the updated purchase is detected. But, that is a terrible UX.

The Redeem Offer button is still blue and active. However, if the user presses this button, they get an error about already redeeming that offer, which makes sense.

The attached image shows the UI that the process becomes stuck on, never dismissing unless cancelled.

Expected Behavior

The system level UI should dismiss after successful redemption.

Screenshots

image

Environment:

  • react-native-iap: ^7.5.6
  • react-native: ^0.63.5
  • Platforms (iOS, Android, emulator, simulator, device): iOS 14 and 16

Additional Context

I realize that we are running a rather old version of react-native-iap, however, when comparing the code for this feature, there doesn't seem to be anything that has changed between 7.5.6 and 12.x.x. Since updating RNIAP involves significant changes, I was hoping to get some reassurance that upgrading may help this issue before doing so.

Additionally, this feature is extremely difficult to test. From what I have gathered, custom offer codes cannot be tested outside of production. The codes do not even work in the TestFlight environment.

I have tested via the Xcode StoreKit testing process, which does function as expected. However, it uses a different UI as part of the testing, so I'm convinced it is a good test.

I have also reached out to Apple via the TSI system. Apple responded that they could not help, and asked that I file a bug report.

I am unable to find any reports of the same behavior, regardless of using RN + RNIAP, or not...

Anyone have any guidance on this?

curiousdustin avatar Mar 07 '23 20:03 curiousdustin

I'm having the exact same issue on my app, except it doesn't get recognized by purchaseUpdatedListener, so the modal stays open and the purchase does not go through

ahunter135 avatar Apr 06 '23 18:04 ahunter135

@ahunter135 What version of react-native and react-native-iap are you using?

I am curious to know if other versions of either are also experiencing this problem.

curiousdustin avatar Apr 06 '23 19:04 curiousdustin

Experiencing the same problem here. We are on react-native version 0.64.2 and react-native-iap version 12.10.5.

Once "Redeem" is pressed, the screen just hangs.

edwardlafoy avatar May 22 '23 17:05 edwardlafoy

Thank you @curiousdustin! your additional context helped me to get to this video and test the whole flow for offer code redemption.

For me, the flow gets completed and I get the success page where I get the option to close the presented sheet.

The only issue I'm facing now is that, even after getting success for redeeming the code, I did not get an event on purchaseUpdatedListener or promotedProductListener.

Any idea what should be the next flow/steps?

chiragbhaiji avatar Jun 29 '23 08:06 chiragbhaiji

Experiencing issue with purchaseUpdatedListener is not listening subscription purchase using offer code through presentCodeRedemptionSheetIOS. Getting issue in production setup and also with storeKit testing(Environment: XCode).

Any idea what should be the steps? My setup is seems like proper as documentation suggest and it is working for subscription purchase without offer code.

naishadh-hyperspace avatar Jan 02 '24 13:01 naishadh-hyperspace

Did you ever solve this? I'm having the same issue

grp06 avatar Feb 23 '24 14:02 grp06

Any updates? maybe somebody have example of implementation for offer codes?

bataevvlad avatar Apr 15 '24 14:04 bataevvlad