Skip to main content

I’m testing my iOS app (designed for iPhone/iPad) on Apple Silicon, and when trying to purchase a subscription I get the next error:

ERROR: 💰 Product purchase for 'pro_plan_subscription' failed with error: PurchasesError(error: There was an unknown backend error., userInfo: n"NSLocalizedDescription": "There was an unknown backend error. The API key is not intended for the Platform. (7810)", "NSUnderlyingError": Error Domain=RevenueCat.BackendErrorCode Code=-1 "The API key is not intended for the Platform. (7810)" UserInfo={rc_backend_error_code=7810, NSLocalizedDescription=The API key is not intended for the Platform. (7810)}, "rc_backend_error_code": 7810, "readable_error_code": "UNKNOWN_BACKEND_ERROR", "source_file": "RevenueCat/HTTPClient.swift:886", "rc_response_status_code": 403, "source_function": "parseUnsuccessfulResponse()"])

 

I’ve checked the RevenueCat admin dashboard and ensured there’s no separate option for Mac App Store. There’s only one unified AppStore option for iOS, macOS, tvOS, so it means the API key should be correct for Mac App Store too.

Could you please advise, how can it be resolved?

Note: Purchases are working 100% correctly when running on iOS.

Environment: "@revenuecat/purchases-capacitor": "9.0.7" Capacitor plugin in Ionic App.

Hi! What does the API Key that you’re initializing the SDK with look like? It should look like `appl_og83wgo8qw3`, or rather, it should start with an `appl_` prefix for it to work on apple platforms


Yes it starts with `appl_` prefix and then 27 random symbols, 32 symbols total. Again, let me remind you - purchases are working 100% OK when iOS app is launched on iPhone/iPad and not working when iOS app is launched on Apple Silicon Mac. It uses the same code base and the same API key.

In addition I can say, that all the Apple native stuff seems to be working smoothly - I can get “Purchase succeeded” App Store alert on mac when doing purchase, but RevenueCat seems to not handle it properly - probably because it detects it’s running on mac.


Guys from RevenueCat stuff, could you help please? It’s a pretty critical issue because it blocks purchases in app when running on Mac.


Hi ​@DmitryS, on my end I was able to find your project and in your server logs I see your Google API key being used when the platform is iOS which is where the “The API key is not intended for the Platform” error is coming from. Please make sure to be using your Apple API key and let me know if it works after.

 

 


Hi Haley, indeed - the Angular’s “this.platform.is(‘ios’)” check returns ‘false’ when running on mac, so the wrong platform was detected and wrong API key was used. I’ve used Capacitor’s platform check and now purchasing works smoothly on mac.

Thank you for help!


Reply