-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subsequent product register/refresh doesn't work on iOS #333
Comments
store.once(purchaseID).approved(function (product) {
order.finish();
}); should be: store.once(purchaseID).approved(function (order) { // order!
order.finish();
}); |
Thanks! I fixed that, but still having a problem on iOS. So this is what it looks like currently:
So on fresh launch of the app, the first purchase goes through perfectly. But then if I tap another product to purchase, the last alert I see is "init ordering" with the new purchaseID. And then that's it. No other alerts or messages. Would you be available to consult with us via screen share to help us resolve this? |
So here's what I just noticed:
So perhaps subsequent products are not getting registered properly with the App Store? Is there a way to reset the store after each purchase? |
Another discovery ... Each of our products is available as a non-consumable or consumable (rental) with slightly different IDs. The non-consumable products will work perfectly on the first purchase on a fresh launch of the app. The consumable products will not trigger the App Store alert even on first attempt. Not sure if this is relevant, but the non-consumable products register as something like this: var registerObj = { var registerObj = { |
Hi @gsfioravanti, i'm experiencing exactly the same issue. I also do register products on demand, one at a time (because i use 50+ non consumable products). Thank you |
I am having the same issue on iOS, Any updates on this? Has any of you tried to register all products in advance (using a for loop or something..). I have 1600+ products, I am not sure the device will be able to handle that. |
Hi @arielfaur, I did try that approach, and even though I had to register far less products than you (~100) it didn't seem to work. I then changed to a 'on demand' approach making only the right register action on the product info page (my app is similar to google play store, with a big store and a product page). The only issue is that you need to keep prices synced. Good luck |
Hi @rotoxl How did you implement on-demand product registration? Whenever I try to register a second product after having called |
Hi again, I'm going to try to explain the flow. My first advice is: keep your android purchase code completely appart from iOS', cause you may break things.
I hope this helps |
Thanks for such a detailed information. I have a question about your workflow. My Android app is already working so I am focusing exclusively on iOS here. I am not sure I follow what you're doing in step 3. Will |
Hi @arielfaur, Step 1: that's correct, I take product info & price from my datasource (right now, a javascript file synced by phonegap-plugin-contentsync: http://www.raymondcamden.com/2015/05/19/working-with-the-new-phonegapcordova-contentsync-plugin/), just to be able to defer the product registration. Step 3: ummm, didn't notice that it was undocumented, maybe I took that from http://www.joshmorony.com/how-to-create-ios-in-app-purchases-with-phonegap-build/. I don't get prices here, as you've guessed, I should need to remove the line and test my app. Good luck |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I had exactly the same problem when it worked out correctly on Android. The problem was that I was registering product when they were supposed to be purchased and this does not work on iOS. To have it working properly on iOS you need to register all product upfront and then all your purchases will be available. Working example on iOS:
Working on Android, not working on iOS:
Suggestion by @rotoxl in issue#333 (comment) does really applies good to this use case, i.e. keep your android purchase code completely apart from iOS', cause you may break things. Lazy loaded registrations looks like are not supported (at lest on iOS from my experience), recently I've submitted an issue#938 about it. |
I'm encountering a strange issue with this plugin on iOS (and discrepancies in behavior between Android):
Our app has hundreds of products for in-app purchase so rather than registering each product up front, we’d like to just register each product when the user taps to purchase. Here’s our relevant code:
On iOS, the first purchase attempt completes properly, but subsequent attempts just never trigger the ordering. And we're also not sure if this is a sandbox issue because sometimes we also get "application data" back as the "id" after registering subsequent products.
And then some code works on Android, but not iOS and vice versa.
If anyone can help us resolve this issue, we’d be happy to pay your hourly consulting rate.
The text was updated successfully, but these errors were encountered: