Question

RevenueCatUI PaywallView doesn't disappear and no entitlement after purchase with Apple Sandbox User

  • 2 February 2024
  • 4 replies
  • 71 views

Badge

My Environment:

  • iOS 17
  • SwiftUI
  • RevenueCat 4.33.0
  • Xcode 15.2

My Problem:

  • I have set up two subscriptions in Apple App Store Connect and RevenueCat according to the documentation with one entitlement (“pro”), 2 products, packages and one offering.
  • I have configured a paywall in the RevenueCat dashboard.
  • In App Store Connect, I have configured Sandbox test users.
  • In my App I use Sign-in with Apple to sign in with the test user  and I use the Apple user ID to sign-in with the RC appUserID.
  • In the RC debug overlay, I see the correct user ID and the former anonymous user ID.
  • When I open the RevenueCatUI PaywallView in my App running in the simulator, I see the 2 offered subscriptions. Then I click the buy button and the Apple purchasing dialog opens with the chosen subscription for the Sandbox User.
  • When I click to buy the subscription, I hear a “bing” sound (normally indicating a purchase). Then the Apple purchase dialog disappears and a progress indicator is visible in the purchase button of the RC PaywallView(). After some seconds, the Apple purchase dialog re-appears. I can repeat this several times…
  • When I cancel the Apple purchase dialog and go back and check the entitlements in the RC debug overlay, there are no active entitlements (also not after closing and reopening the app).
  • The purchases() functions of the PurchasesDelegate are not called.
  • The only RC debug log output I see from clicking the RC PaywallView() purchase button on is:
     

    2024-02-02 14:47:18.562270+0100 MyApp[26950:1241147] [purchases] INFO: 💰 Purchasing Product ‘myapp_pro_1y_freeintro_1w' from package in Offering 'pro_default'

    2024-02-02 14:47:18.562430+0100 MyApp[26950:1241147] [purchases] DEBUG: ℹ️ Adding payment for product ‘myapp_pro_1y_freeintro_1w'. 0 transactions already in the queue.

    2024-02-02 14:47:18.822508+0100 MyApp[26950:1241147] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000600002610540) updatedTransaction: myapp_pro_1y_freeintro_1w 0

What’s wrong with my setup? I’ve tried several things already, but without success...


4 replies

Userlevel 4
Badge +6

Hey @ikemuc ,

 

Thanks for reaching out!

 

Can you please create a support ticket and send the full debug logs for this?

 

When this happens, are you getting any response with an error object present or is userCancelled coming back true? 

Badge +1

I am having similar results, any suggestions? Only the ```onPurchaseStarted``` gets called, all of the other events do not and the purchase asking sheet keeps coming back up.

Events not called:

```

onPurchaseCompleted()
onPurchaseError()
onRestoreCompleted()
onRestoreError()
onDismiss()

```

 

Any solutions?

Thanks.

I’m experiencing exactly the same problem, appreciate a reply from support 

Badge +1

I finally got it working, I was missing uploading to RevenueCat dashboard the Apple’s StoreKit Subscription Offer key and StoreKit Testing Framework.

Also, make sure you added the StoreKit Configuration File:

https://www.revenuecat.com/docs/test-and-launch/sandbox/apple-app-store

In Xcode I also added the In-App Purchase capabilities.

 

I hope this helps

Reply