Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS In-app purchase nightmare

We are developing an App with Ionic and cordova-plugin-inapppurchase. We've been struggling more than a week as we get the following error when we try to restore a purchase:

RMStore: unknown product id com.company.appname.myID

{"errorMessage":"Unknown product identifier","errorCode":100}

productId = 'com.company.appname.myID';
like image 969
galgo Avatar asked Oct 17 '22 23:10

galgo


1 Answers

This post is old, but I was able to fix this problem for myself tonight. Using Ionic v1 with the cordova-plugin-inapppurchase, my solution was to change com.company.appname.myID to just myID (the product id of the in app purchase).

I also had a few other problems causing the same exact error message. The main one was needing to inAppPurchase.getProducts(productIds) before attempting inAppPurchase.buy(productId). Also, make sure you're testing on a real device, with a test account created on iTunes connect, and logged out of any other apple ids on your device (I signed out through the iTunes Store app).

Good luck future readers!

like image 179
Matt Goodrich Avatar answered Dec 03 '22 23:12

Matt Goodrich