[Already asked this on SO - but thought here might be a better target audience] https://stackoverflow.com/questions/51862349/ionic-ios-app-with-in-app-purchase-how-to-test-in-app-consumable-product-befor
Building an ionic 3 app and want to add in-app purchases for iOS. But can’t seem to be able to test the in-app purchase products.
I integrated with both Native in app purchase plugins from the Ionic Native documentation website In App Purchase and In App Purchase 2 i am not able to test any of the products. i always get the error that the “Unknown product identifier” . ( NOTE: this works ok with Google Play in-app purchases)
Important : this is pre any submission of the app with in-app purchases to the App Store (however the app has been approved before and is published in the App Store). I already have an in-app purchase product created in App Store Connect that is “cleared for sale” and “ready for submission”.
also - i have checked the following:
- Paid Applications contract in iTunes is signed
- in-app purchase capability in Xcode is turned on (i run
ionic cordova prepare iosand opened the workspace in Xcode)
- App ID in the Identifiers section of developer.apple.com page exists and has In-App Purchase Enabled for both Dev and Distribution
- created Sandbox user for testing
All the above being considered i tried building both in Debug and Release mode - with iOS App Development profile and App Store or Ad Hoc distribution profiles and deployed to a trusted device and always get that same error when i try to purchase the product “Unknown product identifier” .
Is there something i am missing - is there something i need to do for the build, or set-up on the profiles. Or does it have to do with the in-app purchase product not being approved yet (although i can’t submit the product without submitting a new build with in-app purchases and the new build is not good because i can’t test the product - kind of the egg and the chicken problem).
Any help and/or pointers would be appreciated, as i ran out of ideas.