Can't get [Environment: Sandbox] when testing InApp purchase

""I have an app that includes InApp purchases.


I'm following the guidelines at:


https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/ShowUI.html#//apple_ref/doc/uid/TP40008267-CH3-SW11


"On a development iOS device, sign out of the App Store in Settings. Then build and run your app from Xcode."


"Use your app to make an in-app purchase. When prompted to sign in to the App Store, use your test account. Note that the text “[Environment: Sandbox]” appears as part of the prompt, indicating that you’re connected to the test environment."


I have signed out the App Store in the Settings app on this device. Then I run my new app from Xcode and attempt to make an InApp purchase. The pop-up I get is titled "Apple ID Password" without any mention of [Environment: Sandbox]... I have tried this on two different devices, and still don't see the sandbox text.


Any idea what I could be doing wrong?


We have tested and released the app several times before, and I remember the sandbox text appeared in the past... Not sure what I'm missing here.


(We even tried using one of our test users to sign-in without the sandbox text, but that didn't work. Guess it's bricked that account so we'll need to create another test user...)


Thanks for suggestions

Mike

Accepted Reply

There are a number of suggestions here:

https://developer.apple.com/library/ios/technotes/tn2413/_index.html

especially in this paragraph:

https://developer.apple.com/library/ios/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-TROUBLESHOOTING-WHY_ARE_MY_PRODUCT_IDENTIFIERS_BEING_RETURNED_IN_THE_INVALIDPRODUCTIDENTIFIERS_ARRAY_


But it's not clear the 'sandbox environment' shows up on the log in page. It does show up on later alerts.

Replies

There are many reasons why you might be 'pointing' to the production environment not the sandbox. But the most likely reason is that you did not DELETE old builds of the app and sign out of the App Store before reinstalling from Xcode.

Hi PBK,


Thanks for the suggestions.


I thought I'd followed those steps previously... But to make sure I went back, checked that I am signed out of the App Store, deleted the App, turned my device off, turned it on again, re-installed the App from Xcode, and tried to purchase the InApp...


But still don't get the Sandbox message.


Please can you point me to the next most likely problems I might be running into?


Thanks for your time

Mike

There are a number of suggestions here:

https://developer.apple.com/library/ios/technotes/tn2413/_index.html

especially in this paragraph:

https://developer.apple.com/library/ios/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-TROUBLESHOOTING-WHY_ARE_MY_PRODUCT_IDENTIFIERS_BEING_RETURNED_IN_THE_INVALIDPRODUCTIDENTIFIERS_ARRAY_


But it's not clear the 'sandbox environment' shows up on the log in page. It does show up on later alerts.

Thanks! From the way I was reading it it sounded like the "sandbox" should show up immediately. You were right that it actually shows up later on when the purchase is confirmed... Dohhh!


I was getting paranoid that inputting my test-user credentials without the "sandbox" message would kill my test-users...


Thanks again

Mike

I have a similar problem. I did all of the steps (created a new Sandbox test user on itunesconnect; signed out of Itunes and Apps on my test device; ran my app on the test device) and got the Sandbox message once,but now when I try to purchase from my app with the Sanbox test user ID that worked previously, I keep getting the request for an Apple ID over and over again. I read that if by mistake you sign on to a production environment from your test device, that the test user ID will get killed. But I checked the Build Settings in Xcode for Code Signing and it says "IOS Developer."


Is this an Xcode or itunesconnect problem? I hate to keep putting in a new Sandbox tester user ID every time I want to test.


Appreciate any help!

Did you response the problem? The linked FAQs doesn't say anything about the sandbox environment. Sometimes the sandbox environment is mentioned in the popup sometimes not. Even the login popup appears randomly. Mostly not.