IPhone storekit sandbox has stopped working
See the error message reported by Apple below.
UPDATE MON AUG 23rd 10:00 GMT
Although the apple bug report is not closed yet, it now works (at least for us). OK. Maybe they nailed it, or a fix is in testing and I'll lecture when (if) I hear something from Apple.
UPDATE FRI AUG 20th
Just to say that I got an email from Apple Engineering (21:20 GMT) and they said:
"Thanks for reporting this. We are aware of this issue and are currently working on a fix."
So, hopefully there will be a resolution soon!
[update to question below. Currently there is definitely a storage issue for storekit . I've seen 4 or 5 other people report the same error, but would appreciate a larger sample size! If you have a storekit implementation that you can sandbox it if you can report if it works for you that would be much appreciated. I have logged the apple bug as bug ID # 8329461, but I don’t know how else to speed it up, or if this is indeed a widespread problem. ]
I have a working storekit implementation for iPhone in development. All items for purchase are consumable, we have a few test accounts.
Today, my sequence is on,
1) Request a list of products from Apple ... works great (so can connect to save OK)
2) Point of purchase - receive the message "Confirm your presence in the application" as usual
3) (click buy button)
4a) My code is getting a failed transaction with error code 2, and the description "cannot connect to itunes store" using the transaction procedure - (void) paymentQueue: (SKPaymentQueue *) updateTransactions: (NSArray *).
[[SKPaymentQueue defaultQueue] finishTransaction: transaction] is called in this situation.
4b) The user receives a warning "You already bought this but it has not been downloaded" (it was never purchased on this device with this user account).
This happens across devices and with test accounts that have not been used before. I am not aware of any changes in our code. Can anyone else confirm that the storekit test environment is working correctly for them? Does anyone else have a problem today?
Any ideas as to what is causing this weirdness? The "unable to connect to itunes store" message seems strange as it explicitly allows you to recover product IDs and monitor the transaction.
NB. I also note that the setup for test user accounts in the store has changed - there are now stricter password requirements, etc., and so I'm wondering if Apple has changed anything that might be causing the problem.
TIA Roger
PS. The first time I try on a new device, I get the warning "can't connect to itunes storage, please try again later", but then what happens is that the device thinks it has already been purchased, so the download message appears again.
a source to share
I have the same problem too. It seems like a couple of days ago. I'm on iPad. Exactly the same description as Roger wrote.
Tried erasing all content and settings on iPad. Does not work. Tried several networks. It seemed like I had a real slow connection at first. Took a long time to get a response from the store with product information. As of today, I am very quick to connect to the store, but still have the same error after being notified that I have already purchased the product. Created new users, everyone. No. I went through all the code and everything looks fine. It definitely seems like the issue is sandbox related. Hope to see an update to this theme soon.
Edit
For now, I just skip the buy request and call my collateral method: when you select to buy. Since the store is still providing me with products, I can keep testing and working on the content delivery aspect, but it would be nice to get this to work.
a source to share
I suffered from this problem too. I had a fully functional work in App Purchase. Later I uploaded a new binary and approved it. I made some other changes to the app, and also used a foreign user purchase "IN APP", tried to enter "Settings". Later when I tested it again it didn't work anymore. The error I received was "Failed to connect to iTunes", "Domain Error = NSURLErrorDomain Code = -1009". Pulled out a lot of hair. I was able to fix this by logging out of iTunes account on iPhone, "clearing all targets", and also logging out of iTunes on my MAC address (I closed iTunes), creating a new "local" In-App user (necessary?) into this account on my iPhone and then it started working!Some of the above might be voodoo, but it worked. Hope this helps a few people.
a source to share
After announcing the "fix", Apple still has this issue. It looks like the purchase transaction just crashes and the test user enters their credentials. But when the user of the test is already logged in, everything is fine.
Either [SKPayment paymentWithProduct: product] or [SKPayment paymentWithProductIdentifier: product.productIdentifier] works with the displayed user despite a successful product request.
Anyone have a workaround?
a source to share
I've been sitting down on the same issue all the time in Lion and macOS (not iPhone). The sandbox doesn't work.
I just got an "Unknown error" when trying to make a purchase and a console error like this
8/23/11 1:12:26.090 PM storeagent: promptResponse: <CKSignInPromptResponse:0x7fe1c14fb2a0 returnCode:-1>
If there is another poor soul like me who burned their brains for hours to get the job done, I just found the answer: in-app purchase sandbox ONLY works for users testing the US. Other stores are not working (my test user was set to Argentina ...). Create a new user Test, install it in the US store and it will work ...
Hope this helps.
a source to share
For those who have a problem similar to "Can't connect to iTunes Store", remember to sign out of your Apple ID in iTunes and App Store in Settings and try using a test account connected to your iTunes Connect account. with access to your application and when purchasing an application
a source to share