I have a working code for In-App purchase , its working fine in iOS6 but when I run in iOS7 I got "Failed to load list of products" in debug area and when I tap on restore button to get the already purchased product it says "Cannot connect to iTunes Store".
I searched a lot but did not found any solution for this.
Please suggest
this is also happening for past few days on all iOS-es. Most of the time it gives same message on device as well. Though I have I know the code I have does not any issue and when I submitted to app and it is approved, it works perfectly. It looks like some issue with sandbox env.
DId you test it on simulator?
https://developer.apple.com/library/mac/releasenotes/DeveloperTools/RN-Xcode/#//apple_ref/doc/uid/TP40001051-SW241
StoreKit (In-App purchases) will not work in the Simulator. 13962338
Related
I am using RevenueCat in my iOS and Android Flutter app, for allowing the purchase of a monthly/annually subscription.
On my Sandbox environment everything works great, but for some reason, my app was rejected by Apple more than 5 times with the same RevenueCat error - Purchase Already in Progress (please see the screenshot Apple sent me, attached to this question).
I've read every relevant content online regarding this error, including StackOverflow, and most of the replies indicates it is not something in the code but rather on RevenueCat's/Apple's side.
Is there anything I can do in order to fix this error at Apple, and make them approve my app? (Or at least guide them what they should do in order for it to work?)
Thank you very much!
The RevenueCat error:
It seems to work until the point where I get an alert with the message: You've already purchased this In-App Purchase but it hasn't been downloaded.
I read a lot about it, and all I understood form this answer -
https://stackoverflow.com/a/24102236/2382237
that the only one way to test it on ios8 - launch app on the real device.
Recently I no longer receive test ads on both the simulator and devices and I can't figure out why. To test I've used Apple's iAd suite and it does not appear on there either. I've changed the fill rate to 100% and yet didFailToReceiveAdWithError is called 100% of the time so I'm starting to think it's a problem with Xcode, bearing in mind these same apps were working absolutely fine last week. I downloaded a fresh set from Apple just in case I inadvertently tweaked something.
The only change I can think of is I've set up provisioning profiles but I should think that has nothing to do with it?
Any one have any ideas?
Thanks,
I've run Apple sample code (both on simulator and device) and ad doesn't appear too (I got the error code 3).
I've also tried to run the app with a AppID and mobile provision for an app on which I've enable iAD Network on itunesconnect, it didn't change anything.
Seems to be an Apple's server problem, the server is unable to send ads.
I've looked through the many existing questions related to "Cannot connect to iTunes store" issues with iOS StoreKit and I don't think my situation is covered:
When running in the iOS Simulator, I get the "Cannot connect to iTunes store" error after restoring a previous bought in app purchase. If I hit Cancel, the popup goes away and the restore is successful.
There is no problem at all when buying the in app purchase, only when restoring.
Also, the problem only occurs on the simulator, not when testing on a real iPhone.
I'm pretty sure everything is OK, just wanted to confirm that it is just a simulator bug. Any one else seen this one?
Having researched this as much as I can, and confirmed that there are no issues when running on a device, either in sandbox mode or (since yesterday, when the IAP was approved by Apple) using a real Apple ID, I'm assuming this is a simulator bug and can be ignored.
Contrary to the answer posted by iLive below, and repeated elsewhere on SO, testing IAP on the simulator is explicitly supported by Apple, except for hosted content downloads.
UPDATE: It would appear that since iOS 7, testing IAP on the simulator is no longer properly supported. I've had it working using the non-64bit simulator, but not with the 64bit iPhone simulator. Your milage may vary. As per pix's comment below, Apple also seem to have removed mention of iOS simulator testing from their documentation.
I do not believe you can test your purchases with the simulator.
From the "In-App Purchase Programming Guide":
Store Kit does not operate in iOS Simulator. When running your application in iOS Simulator, Store Kit logs a warning if your application attempts to retrieve the payment queue. Testing the store must be done on actual devices.
If you look at this link, Apple tells you about what you should do:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/DevelopingwithStoreKit/DevelopingwithStoreKit.html
You can also check out this link: restore button for in-app purchases error
Hope this helped!
I ran into the same problem. I would get the "Cannot connect to iTunes Store". If you press Retry it will send you to the login prompt. However, if you press cancel, you will get "Restore Purchases Successful". This does seem limited to the simulator.
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/index.html#//apple_ref/doc/uid/TP40001051-SW241
StoreKit (In-App purchases) will not work in the Simulator. 13962338
Make sure you use an account which is an sandbox user. I tried to use my personal iCloud account on Sandbox which got rejected with the same error.
As of recent (Version 8 and onwards) Xcode releases, I'd qualify the state of StoreKit in the simulator as partially implemented.
Apple officially says you need to test it on the device, however some calls seem to supported in the Simulator – at least the SKProductRequest always works flawlessly. Completing a purchase may or may not work.
I have integrated in-App purchase in my application successfully. I tested it properly by making test user account in itunes. My in-app purchase worked fine. But suddenly my IAP stopped working.
App can load all of the products but after entering my account credentials then transection queue undergoes state SKPaymentTransactionStateFailed and gives an error
Error Domain=SSServerErrorDomain Code=5002 "An unknown error has occurred"
It seems that the storekit does not work in the simulator any longer. I quote from storekit docs:
Note: Store Kit does not operate in iOS Simulator. When running your
application in iOS Simulator, Store Kit logs a warning if your
application attempts to retrieve the payment queue. Testing the store
must be done on actual devices.
Store Kit Docs
If you are testing on real device, make sure it is not JB.
If you are testing on simulator, make sure you are running iOS 6.0 or above, lower version of simulator doesn't work, I wasted a whole day to figure this out...
It has been stopped working on simulator. try to use it on real device. It will work fine.
I've run into the same error on iOS Simulator, but it works on my device(iPhone 3G).
The error is returned from Apple's Server, it's not under control by us.
Facing the same problem in ios 5.1 the store kit dosent work on simulator anymore you need to check it in the device.
And even after connecting to the device say you get an error code "Cannot connect to iTunes Store"
then that means that your device cannot contact the apple store and that is something which is not your fault.
To fix this, sign out of any existing account in the Settings app on your device.