75 Replies
      Latest reply: Dec 28, 2017 1:32 AM by toanhnv RSS
      u.rose Level 1 Level 1 (0 points)

        I've upgraed to iOS11 Beta

        and i tested in-app purchase and i can't connect to the Appstore.

        i just get error "Cannot Connect to iTunes Store"

         

        tried:

        1. i select in-app product for buy

        2. i tried buy using sandbox account

        3. i get "Cannot Connect to iTunes Store"

         

        In ios10, I successed in-app purchase test using same sandbox account.

         

        Anyone else having the same problem?

        • Re: ios11 beta sandbox cannot connect to App Store
          RRUK01 Level 1 Level 1 (5 points)

          Yep on my 10.3 device I can access app store and download apps, on my ios 11 device cannot access App Store at all.. both using the same account

          • Re: ios11 beta sandbox cannot connect to App Store
            bsabiston Level 1 Level 1 (20 points)

            I am getting this error too -- is it just broken right now?  I can connect to get the price and it detects whether or not I use the correct password, but it won't go ahead and do a sandbox test purchase.

              • Re: ios11 beta sandbox cannot connect to App Store
                FrankLemon Level 1 Level 1 (0 points)

                I have the same problem.

                  • Re: ios11 beta sandbox cannot connect to App Store
                    bsabiston Level 1 Level 1 (20 points)

                    I wonder if this affects everyone or just a few?  Sometime in the next week they'll probably begin accepting iOS 11 apps, and we can't test in-app purchases.  Anyone from Apple reading this?  I will file a bug but I am curious whether it is actually a bug or just something screwy with my app/setup.

                      • Re: ios11 beta sandbox cannot connect to App Store
                        FrankLemon Level 1 Level 1 (0 points)

                        In ios 11, when I sign in the sandbox account, wait a minute, Sign-in alert indication again.

                        In ios10.3, I successed in-app purchase test using same sandbox account.

                        I didn't get any related logs.

                          • Re: ios11 beta sandbox cannot connect to App Store
                            jeffkempster Level 1 Level 1 (0 points)

                            This exact behavior is happengin to me.  I spent most of today checking code that worked last week.  In my case, the last time I tried I had iOS 11 beta 8.  I am still getting the right price, description when I ask the store for any purchases.   I can also restore a purchase just fine.  I just can't test a new purchase.  It just asks for the id/password 3 times and then fails with an SKError .unknown error.

                              • Re: ios11 beta sandbox cannot connect to App Store
                                rich Apple Staff Apple Staff (175 points)

                                The issue which you've discovered with iOS 11 beta is a bug report issue. Please follow these instructions.

                                 

                                To submit a bug report for investigation by Apps Ops Engineering, please use the Apple Developer Bug Report web page - http://bugreport.apple.com.

                                After logging in, select the iTunesConnect Product.

                                 

                                Fill out the bug report form. In the description section - please include

                                1. the application ID and the iOS version and build

                                2. if applicable, the iTunes Store that the purchase was attempted - US, Canada, Mexico, China, Russia, etc.

                                3. The in-app purchase identifiers that are failing to be purchased

                                4. The steps to find the in-app purchase items. If the application is is other than English, please include screenshots showing now to navigate the app to find the in-app purchase items.

                                Indicate that you are preparing a TestFlight build and will send a TestFlight invitation.

                                 

                                Save the bug report and keep track of the bug report number

                                 

                                Prepare a TestFlight build - when ready submit an invitation to “apps_test@icloud.com”. In the invitation, please include the bug report number to associate the invitation with.

                                 

                                rich kubota - rkubota@apple.com

                                developer technical support CoreOS/Hardware/MFI

                      • Re: ios11 beta sandbox cannot connect to App Store
                        sfathimulla Level 1 Level 1 (0 points)

                        Has this issue been addressed? The official release is coming up fairly soon and we're still experiencing this issue.

                          • Re: ios11 beta sandbox cannot connect to App Store
                            bsabiston Level 1 Level 1 (20 points)

                            I filed a bug on it yesterday, and this morning there was an email from them asking me to reproduce the issue and send them a system log.  I sent that to them so maybe they are working on it...

                              • Re: ios11 beta sandbox cannot connect to App Store
                                rich Apple Staff Apple Staff (175 points)

                                Out of curiousity, when you created the log, had you installed the App Store/iTunes Store profile for iOS before capturing the log. This may not have been part of the instructions, but it should have been. If you didn't install the profile, you might want to capture the log again, but before doing this, install the App Store/iTunes Store profile. You can install the profile to your device by accessing the following web page on your device

                                https://developer.apple.com/bug-reporting/profiles-and-logs/

                                Find the App Store/iTunes Store profile for iOS and tap the "profile" button. Follow the instructions to install the profile, then restart your device. After the device is restarted, you can open the Settings app -> General -> Profiles & Device Management - Look for the presence of the "iTunes and App Stores Diagnostics Profile" in the list - to know that the profile is active.

                                Attach the device to a macOS Sierra (10.12) system, the open the Console app on the macOS Sierra. You can select your device in the log list on the left side of the console window.

                                Run the iOS app, to the point where the problem occurs, then save the log- attach it with the bug report.

                                This log will contain additional logging from the itunesstored which will help the QA engineer figure out the issue.

                                 

                                rich kubota - rkubota@apple.com

                                developer technical support CoreOS/Hardware/MFI

                            • Re: ios11 beta sandbox cannot connect to App Store
                              jeffkempster Level 1 Level 1 (0 points)

                              This is just an update.  The issue is still happening to me.  It will not let me purchase my IAP using a sandbox environement.  These are my steps again.

                               

                              1. Erase app from test device

                              2. Logout of production AppStore Account

                              3. Build and run a development build on test device.

                              4. Try to buy.

                              5. Display ID/Password dialog.

                              6. Waits about 10 seconds and displays again

                              7. Try 2 more time and the purchase fails with an SKError .unknown error.

                               

                              I did discover that I can buy the IAP through a test flight build.  I guess that is positive.   I followed Rich's suggestions and created an external beta test build for my app and added apple to the list of testers.  I also added my bug report number.

                               

                              I did get a response back from Apple yay, and they confirmed that it works for them under Test Flight.  But for me that really isn't the issue.  It won't work for me under a normal development build using the sandbox environment. 

                               

                              I am waiting for tomorrow to see if we get a GM or iOS 11 and a final Xcode 9 to test this further.

                                • Re: ios11 beta sandbox cannot connect to App Store
                                  rich Apple Staff Apple Staff (175 points)

                                  I replicated the issue described by Jeff. It's one that will be encountered by testing, but not so likely in production. There is one key requirement to this issue - the Setting app -> iTunes and App Store user setting is blank. It may also be that the app has to be built by Xcode 9.

                                  In this case, when you test the StoreKit app in the sandbox, you enter this endless loop - you enter the iTunes user info - name and password, and you keep seeing the Atuh dialog, before the purchase fails.

                                   

                                  The workaround is to enter the test user ID in the Settings app -> iTunes and App Store user setting, then run the test. In this case, when the Auth dialog appears, you need only enter the password.

                                   

                                  This is the bug report I replicated. The workaround isn't great, but at least  it will allow you to test the in app purchases. If your issue is different, then please submit a bug report, or request support via a DTS incident and I can investigate the issue myself.

                                   

                                  rich kubota - rkubota@apple.com

                                  developer technical support CoreOS/Hardware/MFI

                                    • Re: ios11 beta sandbox cannot connect to App Store
                                      liscio Level 1 Level 1 (10 points)

                                      I just tried this workaround using a device that was giving me trouble, and it worked great, thanks!

                                       

                                      Just as a note to others, I encountered one "hiccup" while following the steps above. After signing in, I received an alert that stated something along the lines of: "iTunes Account Creation is not available for this ID". Despite that message, I was able to resume my testing.

                                       

                                      Rich: I have one remaining question, though. All the documentation indicates that signing into the production environment using a sandbox user ID would cause the login to be disabled. I've avoided entering my test credentials into the Settings app under iTunes & App Store for this reason. Is it now safe to enter your sandbox account details here? It sure would be nice to avoid having to enter both the login _and_ password each time I run my testing…

                                       

                                      Thanks again,

                                       

                                      Chris

                                        • Re: ios11 beta sandbox cannot connect to App Store
                                          rich Apple Staff Apple Staff (175 points)

                                          Chris,

                                           

                                          This is a question more for the iTunesConnect folks, but to my knowledge, the entry of either a production of test user account is recognized by the iTunes Store server. So if you enter a test user account with password, the sandbox environment is automatically used for StoreKit calls. If a production account is entered - with password, the production side of StoreKit is used. The TestFlight environment was implemented to facilitate sandbox testing with a production user account. All of this is managed by the iTunes Store server. It's supposed to "just work". When it doesn't, the only option is to submit a bug report.

                                           

                                          rich kubota - rkubota@apple.com

                                          developer technical support CoreOS/Hardware/MFI

                                        • Re: ios11 beta sandbox cannot connect to App Store
                                          bsabiston Level 1 Level 1 (20 points)

                                          When I try to enter a sandbox user into the Settings app, it wants me to go through the whole account setup including credit card information.  Do we have to do that for each test user?

                                           

                                          I tried entering Paypal, but it doesn't let me go past that page, saying "You did not complete the entire form" -- maybe because my Paypal account is different from the sandbox user emai?

                                            • Re: ios11 beta sandbox cannot connect to App Store
                                              rich Apple Staff Apple Staff (175 points)

                                              You should never have to register a credit card for sandbox testing. When this happens, the system thinks that the test user account is being or has been used in the production environment. It would be for someone on the iTunes Store server team to explain why this happens in more detail. However if you are asked to enter credit card info - stop the test and restart the device. If you still get queried to enter credit card info, it's time to create a new test user account.

                                               

                                              rich kubota - rkubota@apple.com

                                              developer technical support CoreOS/Hardware/MFI

                                                • Re: ios11 beta sandbox cannot connect to App Store
                                                  bsabiston Level 1 Level 1 (20 points)

                                                  By "stop the test" you just mean stop trying to enter the user details into the Settings app?  And by "new test user account" you are referring to a Sandbox Tester account in iTunes Connect, right?  I've tried it with 3 sandbox test accounts so far and gotten the same results, it treats it as a regular account.  I'll try creating a brand new one I guess.

                                                  • Re: ios11 beta sandbox cannot connect to App Store
                                                    bsabiston Level 1 Level 1 (20 points)

                                                    OK, with a brand-new sandbox tester account, it did not ask for my credit card.  I got the "iTunes account creation not allowed" message.  It doesn't appear to change anything on the Settings -- no one is logged in, just like before.  Is that step even needed?  Maybe all I needed to do was create a brand-new sandbox user and use that to test my app...

                                                     

                                                    When I go into my app and try the new user, and choose "existing AppleID", then at first it does the thing where it asks for my credentials a second time.  But then I hit Cancel, and the second time I tried it it acted like I was already logged in, and it let me purchase.

                                                     

                                                    I'm just going to assume it will work in the production environment.  I'll test it on Testflight I guess.

                                                • Re: ios11 beta sandbox cannot connect to App Store
                                                  katiek Level 1 Level 1 (0 points)

                                                  This workaround doesn't work for me. I log in in Settings with sandbox creds, but in the app I get both fields blank (email/pwd) and getting into same loop. Is there any ref  # for issue reported to monitor the status / get info on the solution? Thanks

                                                    • Re: ios11 beta sandbox cannot connect to App Store
                                                      bsabiston Level 1 Level 1 (20 points)

                                                      The bug number in Bug Reporter for the issue I filed was 34240619.  I haven't heard anything back from them.

                                                       

                                                      The only thing that has worked for me was to create an entirely new tester account, which is a pain because you have to come up with a new email address to go along with it.  It will give you the error mentioned by Liscio above when you try to log in using Settings, but it works when you test your app, at least it did for me.  All of my pre-existing Sandbox tester accounts did not work for me.

                                                    • Re: ios11 beta sandbox cannot connect to App Store
                                                      mungbeans Level 1 Level 1 (10 points)

                                                      "The workaround is to enter the test user ID in the Settings app -> iTunes and App Store user setting, then run the test. In this case, when the Auth dialog appears, you need only enter the password."

                                                       

                                                      Please explain firstly how this workaround is even possible? Any attempt to enter a sandbox id into settings/iTunes &App Stores results in an error dialog: "This Apple ID cannot be used with the iTunes Store at this time"

                                                       

                                                      Secondly, if it is somehow possible to enter the id here, how does this not violate the warning in the official Apple IAP sandbox testing documentation, which states:

                                                       

                                                      "Important: Don’t use your test user account to sign in to the production environment. If you do, the test user account becomes invalid and can no longer be used."


                                                      Wouldn't what you are suggesting as the workaround be using a test user account to sign into the production environment? So it would instantly become invalid?

                                                  • Re: ios11 beta sandbox cannot connect to App Store
                                                    bvsdev Level 2 Level 2 (25 points)

                                                    Ok, I finally got it working. Here are the steps:

                                                    (Device is running iOS11)

                                                    1.Create sandbox tester acount (and verify user on the email it sends)

                                                    2. Go to settings on your test device and log out of the App Store.

                                                    3. Connect your device to your Mac and run your app from Xcode.

                                                    4. Make an IAP purchase. Sign in with your sandbox tester account when prompted.

                                                    5 Sign in again (it will make you sign in twice). This time it will go quiet. No confirmation of purchase.

                                                    6. Stop your app and run it again.

                                                    7. Make an IAP purchase. This time it remembers your sandbox test account so you only need to provide your password.

                                                    8. Your purchase is successful

                                                     

                                                    I hope it works for you too!

                                                    • Re: ios11 beta sandbox cannot connect to App Store
                                                      u.rose Level 1 Level 1 (0 points)

                                                      Recently re-occurring....

                                                      • Re: ios11 beta sandbox cannot connect to App Store
                                                        mungbeans Level 1 Level 1 (10 points)

                                                        iOS 11 is released today. And I can confirm sandbox purchases are still not working in it!

                                                         

                                                        Tested on multiple phones, using multiple sandbox ids (ones that worked previously on iOS 10) and new ids.

                                                         

                                                        App was built using  XCode 9.

                                                         

                                                        Absolutely ridiculous. How is one supposed to develop an IAP app if this feature isn't working?

                                                        • Re: ios11 beta sandbox cannot connect to App Store
                                                          dinh hung Level 1 Level 1 (0 points)

                                                          I have the same problem.

                                                          • Re: ios11 beta sandbox cannot connect to App Store
                                                            daveytea Level 1 Level 1 (0 points)

                                                            I am also experiencing the same problem, with the new iOS11 that was just released to the public. I've tried all the solutions already mentioned in this thread but they have not worked in my case.

                                                            Strangely if I log in with my normal iTunes account and try to purchase an IAP, then the IAP purchase screen will show "[Sandbox]" in the dialogue box... so it knows it should be in sandbox mode. But if I try with my sandbox account, then it keeps failing.

                                                            • Re: ios11 beta sandbox cannot connect to App Store
                                                              SDGCarlos Level 1 Level 1 (0 points)

                                                              Also having this problem, have tried all of the suggestions above. This issue is blocking our release. Please fix ASAP.

                                                              • Re: ios11 beta sandbox cannot connect to App Store
                                                                AppWriter Level 1 Level 1 (0 points)

                                                                I'm having the same problem too.  None of the solutions above worked for me.  I need to test IAP with iOS 11.  Please fix!  I've tried this with 2 different developer accounts and 2 different apps.

                                                                • Re: ios11 beta sandbox cannot connect to App Store
                                                                  liyang-youme Level 1 Level 1 (0 points)

                                                                  Unable to pay, I added another sandbox account. There was no problem with the old sandbox account and the new sandbox account on IOS 10.3. However, on IOS 11, the old account has never been paid successfully, and the new account has been successful once or twice, most of the time after entering the account password, the input box pops up again. I refer to the above suggestion, only log into the sandbox account only in the setting center, but login failed. What should I do?

                                                                  • Re: ios11 beta sandbox cannot connect to App Store
                                                                    AndreiLovin Level 1 Level 1 (0 points)

                                                                    Hi everyone,

                                                                     

                                                                    My app just got rejected in the review because the Purchase would not work on iOS 11. It works on previous versions. The same SKErrorDomain Code=0.


                                                                    Do you have any advice for me? I don't think the reviewer will believe me if I'll tell him that the Apple servers are not working...

                                                                    • Re: ios11 beta sandbox cannot connect to App Store
                                                                      Pete Level 1 Level 1 (0 points)

                                                                      FAR OUT!! and other f words. Here is several hours of my life I will not get back.

                                                                       

                                                                      This is not fixed in iOS11 GM, and according to AndreiLovin above the submitted code does not pass review if we just don't test and assume it works. No iOS11 app submission for me. There must be some workaround to fix this as surely the large app companies like tencent of this world are submitting iOS11 app updates with IAPs.

                                                                        • Re: ios11 beta sandbox cannot connect to App Store
                                                                          bsabiston Level 1 Level 1 (20 points)

                                                                          Did you try it with a brand-new sandbox tester account?  That worked for me.  You cannot log into the Settings app with it - although maybe you have to TRY to do that?  I don't know.  I just know that I made a new account, tried and failed to use it to log into the Settings app, and then tried it to do the in-app purchase on my app, and it finally worked.

                                                                          • Re: ios11 beta sandbox cannot connect to App Store
                                                                            Pete Level 1 Level 1 (0 points)

                                                                            I can confirm that a combination of the above workarounds works. However when it gets to Apple review I'm sure if they test this using Sandbox accounts they aren't going to run the IAP 3 times and pass app review for your app. My steps below to get a successful sandbox IAP buy are:

                                                                             

                                                                            1) Sign out of your prod ID on your device under iTunes and App Store.

                                                                            2) Create a new sandbox Apple ID (I did, maybe an existing one will work)

                                                                            3) Run your app from XCode.

                                                                            4) Perform the IAP three times with the new sandbox ID above!!!!!! The third time it will work. First time you will get a standard sandbox IAP login prompt, it will fail. 2nd time you will get a log in to App store prompt, it will fail. The third time you will get a prompt with the new sandbox ID email address prefilled (meaning that the Apple suggested workaround above with a non null apple ID in settings has taken place) - enter the password, it will work.

                                                                              • Re: ios11 beta sandbox cannot connect to App Store
                                                                                rich Apple Staff Apple Staff (175 points)

                                                                                I see that the seed release of iOS 11.1 has been made available. I'm told that this release contains the fix to this issue. I'm going to check this out for myself. but in the meantime, I'm passing this info along. Please note, only install the seed to one device. Once you install an update, there is no going back to a previous version of iOS

                                                                                 

                                                                                rich kubota - rkubota@apple.com

                                                                                developer technical support CoreOS/Hardware/MFI

                                                                                  • Re: ios11 beta sandbox cannot connect to App Store
                                                                                    rich Apple Staff Apple Staff (175 points)

                                                                                    I hate to say this, but the problem persists in the iOS 11.1 seed now available on the Apple Developer site. I've sent a note to the StoreKit Evangelist that this issue is holding up development of StoreKit apps.

                                                                                     

                                                                                    rich kubota - rkubota@apple.com

                                                                                    developer technical support CoreOS/Hardware/MFI

                                                                                      • Re: ios11 beta sandbox cannot connect to App Store
                                                                                        chad Level 1 Level 1 (0 points)

                                                                                        Rich,

                                                                                         

                                                                                        We are seeing the same issue and it is holding up our initial launch of auto renewing subscriptions unfortunately. I was finally able to get it to work and here is what I had to do:

                                                                                         

                                                                                        1) Log out of iTunes account in Settings

                                                                                        2) Install my app

                                                                                        3) Purchase subscription and login when prompted with a fresh test account (Note: it has to be a new test account)

                                                                                        4) One dialog pops up asking you to enter your password in Settings and immediate another one pops up over it with the full email/password login. Dismiss the full login.

                                                                                        5) Using the dialog launch settings and enter you password. It will give you the error about not being able to create account.

                                                                                        6) Go back to the app and try purchase again. Now you are just asked for password, enter it and it should work.

                                                                                         

                                                                                        WARNING: If you ever log out of that account in iTunes settings, that test account is now burnt and useless.

                                                                                         

                                                                                        Hope that helps someone ... and we get a fix soon.

                                                                                         

                                                                                        Thanks,

                                                                                        Chad

                                                                                          • Re: ios11 beta sandbox cannot connect to App Store
                                                                                            mscsoft Level 1 Level 1 (0 points)

                                                                                            Thank you. This work around did allow me to successfuly make a sandbox in app purchase on iOS 11.0, only that it did not show me two dialow boxes, only one and after that I dismissed it by clicking home button.

                                                                                             

                                                                                            Steps that worked for me:

                                                                                             

                                                                                            1.) Log out of any accounts on iOS store settings

                                                                                            2.) Create a brand new sandbox account on iTunes Connect, with a new e-mail and everything

                                                                                            3.) Confirm the new account e-mail that Apple sends

                                                                                            4.) While still logged out on the device, kill the app (swipe up) and restart it

                                                                                            5.) Start an in app purchase

                                                                                            6.) When app prompts login, input the brand new test account email and password

                                                                                            7.) On my test, after doing step 6 a new login box showed up. I dismissed it by clicking hardware home button. At this point, this purchase is cancelled.

                                                                                            8.) Start an in in purchase again

                                                                                            9.) Now iOS remembered the brand new sandbox account e-mail and only required the pasword.

                                                                                            10.) Input password and sandbox test purchase did work.

                                                                                             

                                                                                            I hope that it can help someone.

                                                                                          • Re: ios11 beta sandbox cannot connect to App Store
                                                                                            vetsac Level 1 Level 1 (0 points)

                                                                                            Hello Rich,

                                                                                             

                                                                                            Since it's been about 2 weeks since your last comment here (Sep 27), do we have any follow-up results or new suggestions to try?

                                                                                             

                                                                                            As you'll see from my Oct 8 reply below to H2OSkier, this iOS 11 Sandbox purchase issue remains. All other workarounds noted previously have proven unsuccessful for me.

                                                                                          • Re: ios11 beta sandbox cannot connect to App Store
                                                                                            lin mouseshi Level 1 Level 1 (0 points)

                                                                                            Hello rich, you save iOS 11.1 fixed the issue? Is it iOS 11.1 or iOS 11.0.1 ? I have install iOS 11.0.1 but still iap not work.

                                                                                      • Re: ios11 beta sandbox cannot connect to App Store
                                                                                        akiporo Level 1 Level 1 (0 points)
                                                                                        • Re: ios11 beta sandbox cannot connect to App Store
                                                                                          maojing Level 1 Level 1 (0 points)

                                                                                          my in-purchase in ios 11.0.1 never work ...... but in ios 10.3.3 ,it works very well (use the same test account).

                                                                                           

                                                                                          now ,i have been rejected twice because the in-purchase.

                                                                                           

                                                                                          the apple's reply:

                                                                                           

                                                                                           

                                                                                          i am really  disappointed in apple team!

                                                                                          • Re: ios11 beta sandbox cannot connect to App Store
                                                                                            Plastik Level 1 Level 1 (0 points)

                                                                                            I figured out a super easy solution to this problem, and I've reproed the fix successfully many times:

                                                                                             

                                                                                            1. When you try to make an IAP for the first time without having signed into any accounts, you will be prompted to sign into an existing account, or to make a new account. Choose existing.

                                                                                             

                                                                                            2. Enter in sandbox account settings.

                                                                                             

                                                                                            3. Another prompt will appear to ask you to sign into an existing account, or to make a new account. At this point, tap the physical home button.

                                                                                             

                                                                                            4. The prompt dismisses. Attempt to make another IAP and another prompt will appear, but this prompt shows your Sandbox ID already signed in, and all you have to do is enter your password. Enter in your password, and you can now make purchases :-)

                                                                                             

                                                                                             

                                                                                            Getting into that double prompt state is important. If you can't get into anymore cause you were messing around with your device, you will need to reset your device back to factory settings.

                                                                                              • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                H2OSkier Level 1 Level 1 (0 points)

                                                                                                This worked for me. Thank you for the hint on the double prompt. What a process...hope its fixed soon!

                                                                                                  • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                    vetsac Level 1 Level 1 (0 points)

                                                                                                    Unfortunately this did not help me. Here are my results:

                                                                                                     

                                                                                                    0. iPhone running iOS 11.0.2 & Xcode 9.0 (9A235)

                                                                                                    1. Settings > iTunes & App Store > Sign out of Production Apple ID

                                                                                                    2. Reboot iPhone

                                                                                                    3. Build and run my app as a fresh install

                                                                                                     

                                                                                                    ATTEMPT A) Using Sandbox user created after iOS 11.0 was released:

                                                                                                    4. Sign In > Use Existing Apple ID

                                                                                                    5. Results in error "Cannot connect to iTunes Store"

                                                                                                    No other dialogue/login prompts appear.

                                                                                                     

                                                                                                    ATTEMPT B) Using a DIFFERENT Sandbox user created after iOS 11.0 was released:

                                                                                                    4. Sign In > Use Existing Apple ID

                                                                                                    5. Repeated prompt: Sign In > Use Existing Apple ID

                                                                                                    6. Tapped device's Home button which removed that Sign In prompt.

                                                                                                    7. I tried to buy IAP again.

                                                                                                    8. Sign In > Use Existing Apple ID

                                                                                                    9. Repeated prompt: Sign In > Use Existing Apple ID

                                                                                                    10. Tapped device's Home button which removed that Sign In prompt.

                                                                                                    11. I tried to buy IAP again.

                                                                                                    12. Sign In > Use Existing Apple ID

                                                                                                    13. Repeated prompt: Sign In > Use Existing Apple ID

                                                                                                    14. Tapped device's Home button which removed that Sign In prompt.

                                                                                                    15. I tried to buy IAP again.

                                                                                                    16. Sign In > Use Existing Apple ID

                                                                                                    17. Repeated prompt: Sign In > Use Existing Apple ID

                                                                                                    18. Tapped device's Home button which removed that Sign In prompt.

                                                                                                    19. I tried to buy IAP again (basically stuck in what appears to be an infinite loop here)

                                                                                                     

                                                                                                    ATTEMPT C) Using same Sandbox user as in Attempt B:

                                                                                                    20. Sign In > Use Existing Apple ID

                                                                                                    21. Repeated prompt: Sign In > Use Existing Apple ID

                                                                                                    22.This time I did NOT do the Home button tap. Instead, I just entered the Sandbox user & pw credentials on the repeated Sign In prompt.

                                                                                                    23. Results in error "Cannot connect to iTunes Store"

                                                                                                    No other dialogue/login prompts appear.

                                                                                                     

                                                                                                     

                                                                                                    Unfortunately, all of the other workarounds mentioned previously also do NOT work for me.

                                                                                                     

                                                                                                    The only thing that gave me a slightly different result was to keep my production Apple ID (e.g. what I use for everyday general non-developer use of my devices) signed into Settings, then build and run my app, and attempt a purchase of my IAP. At that point, I got a prompt asking me to enter my pw for my production Apple ID, with [Sandbox] in the prompt. So the Store apparently saw this purchase attempt under my Production Apple ID as belonging to the Sandbox environment.  (I hit Cancel at that point, as I didnt want to risk getting my production Apple ID account tangled up in possible incomplete transactions, and risk getting incessantly nagged thereafter by the Store prompts.)

                                                                                                     

                                                                                                    It seems this iOS 11 Sandbox issue is still not resolved.

                                                                                                      • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                        dkuo Level 1 Level 1 (0 points)

                                                                                                        I am having the same issue with my IAP sandbox account and the double prompt workaround didn't work for me. Any help is appreciated. Thanks.

                                                                                                        • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                          Plastik Level 1 Level 1 (0 points)

                                                                                                          In my organization, my repro steps do not in-fact work for all sandbox IAP purchases. My repro steps do seem to work 100% for consumable type purchases (we make mobile games here). If you retry my steps for a consumable type purchase, it should work. And once this works, you'll be signed into your sandbox account and you can make purchases types from then on.

                                                                                                           

                                                                                                          Good luck!

                                                                                                           

                                                                                                          Plastik

                                                                                                            • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                              vetsac Level 1 Level 1 (0 points)

                                                                                                              Plastik,

                                                                                                               

                                                                                                              Thanks for clarifying the consumable IAP you're using.  I'm trying to do auto-renewable IAPs, so that seems to explain why the workarounds would work for your situation.

                                                                                                               

                                                                                                              Does anyone else have further insight into this?  Or heard any follow-ups from Apple re: possible iOS 11-related fixes coming?

                                                                                                      • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                        Fabian Bouw Level 1 Level 1 (0 points)

                                                                                                        I have the same issue. I am getting the follow error: Error Domain=SKErrorDomain Code=0. Then it says connection to itunes failed.

                                                                                                         

                                                                                                        Any solution? This has been going on for a month already.

                                                                                                          • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                            rich Apple Staff Apple Staff (175 points)

                                                                                                            I just installed iOS 11.1 beta 2 which is available on the Apple Developer site. I was then able to clear out the iTunes user setting, install the sandbox app, run the app, attempts a purchase, enter my test user account and password, and the purchase worked as expecxted. If you have the app present on the device before you update the device to iOS 11.1 beta2 (beta1 does not work), you shoud see the purchase with the test user account work. However a downside is that if you need to update the app, you will need to install Xcode 9.0.1 - which is also available from the developer site.

                                                                                                             

                                                                                                            rich kubota - rkubota@apple.com

                                                                                                            developer technical support CoreOS/Hardware/MFI

                                                                                                              • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                Fabian Bouw Level 1 Level 1 (0 points)

                                                                                                                Okay, thanks for the heads up. Hopefully these beta's will be official releases soon.

                                                                                                                • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                  tpnpgo Level 1 Level 1 (0 points)

                                                                                                                  I was finally able to get a successful sandbox purchase after following some version of the various steps above.

                                                                                                                  1. I first updated XCode to 9.0.1, which has no mention of storekit changes. Neither does the beta....
                                                                                                                  2. Uninstalled my app & Made sure to logout of the testing account that was stored in the settings
                                                                                                                  3. Upgraded my device to 11.0.3, which also has no mention of storekit fixes/changes. Neither does the beta...
                                                                                                                  4. Went to the "Apple ID" section in settings, then setup iTunes & App Store for my production Apple ID. NOTE: After updating I had skipped setting up iTunes & App Store on my production account
                                                                                                                  5. After enabling and logging into that, I immediately signed out from the item listed in the "Apple ID" screen
                                                                                                                  6. Finally, built and ran my app. Tapped to purchase consumable
                                                                                                                  7. When prompted, chose "use existing" account.
                                                                                                                  8. Logged into newly created apple sandbox account on an alert that showed both email and password fields
                                                                                                                  9. Waited....Got the same prompt again.... entered both email and password to signin again
                                                                                                                  10. Got failure "Can not connect to iTunes"
                                                                                                                  11. Backgrounded application and went to Settings > iTunes & App Store. Watched it refresh to show my sandbox account as the logged in account.
                                                                                                                  12. Built and Ran application again
                                                                                                                  13. Upon attempting the same consumable purchase, I got the purchase alert that already had my sandbox email and only had the password field.
                                                                                                                  14. The purchase worked at this point, and so did future purchases.

                                                                                                                   

                                                                                                                  Rich, please facilitate the communication of this issue to the proper channels so the reviewers are aware. The fact that apps are being rejected because of this bug is just sad. I personally plan to link this thread in my review notes.

                                                                                                                  • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                    vetsac Level 1 Level 1 (0 points)

                                                                                                                    Rich,

                                                                                                                     

                                                                                                                    As a follow-up to tpnpgo's post on Oct 17, 2017 12:02 PM... Note that he got his purchase to work for his consumable IAP. So I tried his steps for my auto-renewable monthly subscription IAP.


                                                                                                                    Here are my results:


                                                                                                                    1. I first updated XCode to 9.0.1, which has no mention of storekit changes. Neither does the beta....

                                                                                                                    2. Uninstalled my app & Made sure to logout of the testing account that was stored in the settings

                                                                                                                    3. Upgraded my device to 11.0.3, which also has no mention of storekit fixes/changes. Neither does the beta...

                                                                                                                    4. Went to the "Apple ID" section in settings, then setup iTunes & App Store for my production Apple ID. NOTE: After updating I had skipped setting up iTunes & App Store on my production account

                                                                                                                    5. After enabling and logging into that, I immediately signed out from the item listed in the "Apple ID" screen

                                                                                                                    6. Finally, built and ran my app. Tapped to purchase my AUTO-RENEWABLE IAP (NOT consumable, as in tpnpgo's post above)

                                                                                                                    7. When prompted, chose "use existing" account.

                                                                                                                    8. Logged into newly created apple sandbox account (which was created after 11.0.3 was released) on an alert that showed both email and password fields

                                                                                                                    9. Waited....Got the same prompt again.... entered both email and password to signin again

                                                                                                                    10. Got failure "Can not connect to iTunes"


                                                                                                                    NOTE -- Here's where my results start to differ from tpnpgo's:

                                                                                                                    11. Backgrounded application and went to Settings > iTunes & App Store. My sandbox AppleID was already populated here.

                                                                                                                    12. Built and Ran application again

                                                                                                                    13. Upon attempting the same AUTO-RENEWABLE purchase, I got the purchase alert that already had my sandbox email and only had the password field.

                                                                                                                    14. Got failure "Can not connect to iTunes"

                                                                                                                    15. In the same app session (i.e. I did NOT re-build and re-run the app), I tried the same AUTO-RENEWABLE purchase again.

                                                                                                                    16. Upon attempting the same AUTO-RENEWABLE purchase, I did NOT have to enter any sandbox AppleID NOR password; instead, I just got the purchase alert flow that happens AFTER that store login user/pw prompt ("Subscription Terms. Subscribe to <my_plan_name>. This subscription will automatically renew every month for $0.99.")

                                                                                                                    17. Got failure "Can not connect to iTunes"

                                                                                                                    18. Tried my app's Restore Purchase just to see if by chance the purchase happened but didn't come thru to the app. However, there were no active purchases that existed for the restore attempt.


                                                                                                                    While it seems the Sandbox + iOS 11 and this "Can not connect to iTunes" problem is an issue for all types of IAP purchases, there does seem to be a difference in failure rate for auto-renewable IAPs as compared to consumables.  Despite all the various workarounds and steps noted in previous posts, I can get none of them to work for my AUTO-RENEWABLE monthly subscription IAPs.

                                                                                                                      • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                        fernandofromcampinas Level 1 Level 1 (0 points)

                                                                                                                        I am exactly with the same situation with subscrption. Tried everything, nothing works. I am really afraid this mess might happen in production too.

                                                                                                                        • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                          vetsac Level 1 Level 1 (0 points)

                                                                                                                          As a follow-up to my Oct 25, 2017 7:11 PM post above...

                                                                                                                           

                                                                                                                          Despite not being able to successfully test my auto-renewable monthly subscription purchases using a Sandbox account, I decided to skip Sandbox altogether and instead test my IAP purchases using a build in Test Flight.

                                                                                                                           

                                                                                                                          I was able to succesfully purchase (and restore) my auto-renewable monthly subscription in my Test Flight build today with my production AppleID account, on my iPhone, iOS 11.0.3 (my Test Flight archive was built and submitted to ITC using Xcode 9.0.1).

                                                                                                                           

                                                                                                                          So at least I know my code works fine. And this seems to clarify that the issue points toward Sandbox and iOS 11 (as Rich noted previously about his test results with iOS 11.1 beta 2).

                                                                                                                           

                                                                                                                          Hopefully this info helps others here who are still struggling with the Sandbox/iOS 11 issue! Try testing your IAP purchases in a Test Flight build if you can as a workaround for Sandbox purchases for now.

                                                                                                                            • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                              vetsac Level 1 Level 1 (0 points)

                                                                                                                              Hey Rich, and everyone,


                                                                                                                              With iOS 11.1 now released, I successfully purchased my auto-renewable IAP with a sandbox account on my first try.


                                                                                                                              Here are my steps today:


                                                                                                                              1. macOS Sierra 10.12.6

                                                                                                                              2. Uninstalled previous test builds of my iOS app, and rebooted iPhone.

                                                                                                                              3. On iPhone > Settings > iTunes & App Store > my every-day use production Apple ID is signed in.

                                                                                                                              4. I updated iPhone to iOS 11.1

                                                                                                                              5. (after iOS 11.1 was released) I created a brand new sandbox account.

                                                                                                                              6. Then I updated to XCode to 9.1 (9B55)

                                                                                                                              7. In Settings > iTunes & App Store > I signed out from my production AppleID.

                                                                                                                              8. Built and ran my app. Tapped to purchase my auto-renewable monthly subscription IAP.

                                                                                                                              9. When prompted, chose "Use Existing" account.

                                                                                                                              10. Logged into my newly created Apple sandbox account (which was created after 11.1 was released) on an alert that showed both email and password fields.

                                                                                                                              11. Got a "Verification Failed" prompt "There was an error connecting to the Apple ID server. Cancel Try Again" (Not sure if this is normal; perhaps I mistyped my sandbox account password, so I did Try Again and re-typed my password.)

                                                                                                                              12. Then got "Subscription Terms" prompt "Subscribe to PLAN NAME for $XX.XX." Cancel / Continue

                                                                                                                              13. Then got "Confirm Subscription" prompt "This subscription will continue unless canncelled in Settings..."    Cancel / OK

                                                                                                                              14. Purchase was successful [Environment Sandbox].


                                                                                                                              So it appears that iOS 11.1 has indeed solved this issue (I never had any successful result in iOS 11.0.x).


                                                                                                                              Thanks Rich - I appreciate the diligence Rich you offered here in working with the Apple teams to resolve this issue for developers!

                                                                                                                      • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                        parito Level 1 Level 1 (0 points)

                                                                                                                        I am also getting this issue, ios 11, xcode 9.01. I cannot make any new product purchases with the sandbox user on my device. It asks for my credentials twice, then says "cannot connect to iTunes store".

                                                                                                                        • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                          ATdk Level 1 Level 1 (0 points)

                                                                                                                          Do you think this might be affecting the App reviewers reviewing the app as well? My app got rejected due to the app reviwer could not sign in to IAP..

                                                                                                                            • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                              fernandofromcampinas Level 1 Level 1 (0 points)

                                                                                                                              I believe they have thiis issue too. My app was rejected with the  "Cannot Connect to iTunes Store" error. It was later approved without them actually testing the subscription.

                                                                                                                               

                                                                                                                              I've spent the day trying to make my auto-renewable subscription work on Sandbox. I just couldn't. It is really upsetting me. iOs 11 was a complete mess for developers, unfortunately.

                                                                                                                                • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                                  Serg K Level 1 Level 1 (0 points)

                                                                                                                                  I have the same issue with auto-revewable subscriptions. And i've spent the whole day (oct 26) trying to test in-app purchase. I used:

                                                                                                                                  iPhone ios 11

                                                                                                                                  iPhone ios 10

                                                                                                                                  iPad ios 11

                                                                                                                                  iPad ios 9

                                                                                                                                  Mac macOS High Sierra 10.13

                                                                                                                                   

                                                                                                                                  In all cases Result is:

                                                                                                                                  Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store"

                                                                                                                                   

                                                                                                                                  Update:

                                                                                                                                  oct 27 - in-app purchase still doesn't work.

                                                                                                                                    • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                                      fernandofromcampinas Level 1 Level 1 (0 points)

                                                                                                                                      Hi,

                                                                                                                                       

                                                                                                                                      As mentioned by vetsac, it seems to work with TestFlight. I will submit one of my apps today to check if reviewers are able to test and approve the in-app. I am pretty scared with these issues in production. I am not 100% sure of how stable the subscriptions are. My numbers float a lot, as it is a work app for soccer coaches, the sales vary a lot during the year, but every week the numbers go down without a reason, I start thinking it is an issue with AppStore subscription, as the numbers of downloads are stable and also the sales on my site and Google Play are. Hopefully it is just my scared mind.

                                                                                                                                       

                                                                                                                                      I will submit the app today and let you know if it was approved. Fingers crossed.

                                                                                                                                       

                                                                                                                                      Fernando

                                                                                                                                        • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                                          wenlung Level 1 Level 1 (0 points)

                                                                                                                                          Hi,

                                                                                                                                           

                                                                                                                                          It seems that no futher update! I recently experienced the same issue, quite often, but not every time. It feels like due to the sandbox appStore bad response time. The error code is vary from 0, 2, -1001 and -1005 but with the same message saying that “can’t connect to app store” when refresh receipt, restore purchase or making in-app purchase.

                                                                                                                                           

                                                                                                                                          :-(

                                                                                                                                           

                                                                                                                                          My device is running iOS 11.2. Dose anyone already get the root cause?

                                                                                                                                           

                                                                                                                                          David Feng

                                                                                                                                  • Re: ios11 beta sandbox cannot connect to App Store
                                                                                                                                    toanhnv Level 1 Level 1 (0 points)

                                                                                                                                    I have same issue and Apple reject my application.
                                                                                                                                    Does any one have answer from apple team?