Skip to main content
Question

iOS Testing staging and production apps, receipt invalid

  • 29 September 2023
  • 2 replies
  • 142 views

Forum|alt.badge.img+2
  • New Member
  • 1 reply

Hi, Im trying to test staging and production apps separately on iOS. To do this, I created separate targets with separate bundle ids. I then followed the guidelines here:

Since I only need to test locally on device and on the simulator, I created a StoreKit configuration test file and downloaded the cert. I then created a separate project in RC with the staging app bundle ID (I already had one with my production app), the app secret from AppStoreConnect, the Storekit cert, and the products setup to match the Storekit configuration file.

I’ve double checked to ensure that in the bundleID matches the bundleID in XCode. I’ve also checked to ensure that the products setup match the products in the StoreKit config file. But, when I try to complete a purchase in my staging app, I get the following error

ERROR: 💰 Product purchase for '(product' failed with error: Error Domain=RevenueCat.ErrorCode Code=8 "The receipt is not valid."

If I click the button a second time it tells me I have already made the purchase before and “subscription will renew on ..”. I have checked other threads to troubleshoot the “receipt invalid” error but none of them seem to point to anything else I can try.

Any help would be appreciated! 

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 492 replies
  • October 3, 2023

Hey @ani!

It sounds like this may be due to the StoreKit certificate uploaded to our dashboard being out of date - if any changes to the StoreKit Config occur, the certificate needs to be re-uploaded: https://www.revenuecat.com/docs/apple-app-store#step-4-uploading-the-public-certificate-to-revenuecat 

 

Can you give that a try?


Forum|alt.badge.img+2
  • Author
  • New Member
  • 1 reply
  • October 5, 2023

Hi @cody thanks a lot for your response. I deleted and re-downloaded the StoreKit certificate but I get the same error :(.  I’ve also double checked that the Bundle ID matches between the target and what’s setup in RC. Any other suggestions? 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings