9 Replies
      Latest reply on Dec 31, 2017 7:10 AM by funkenstrahlen
      PianoBench Level 1 Level 1 (0 points)

        I have an app that is publically available for iPad. We also have a beta version that is distributed through TestFlight. Both are nearly identical and both offer in-app purchases.

         

        The TestFlight version continuously pops a system dialog whenever the app is launched or comes out of the background. The message is:

         

        ***************

        Sign In to iTunes Store

        Enter the password for your Apple ID.....

        ***************

         

        I don't get this message with the public version of the app.

         

        There is something different going on with TestFlight apps or is it expected behavior for a TestFlight app to continuously ask for a sign-in? I can eithe sign in or tap Cancel. Either way, the result is the same.

         

        I should mention that I am signed into iTunes & App Store in Settings with the same Apple ID that is requested by the dialog.

         

        Thanks,

        George

        • Re: Beta App in TestFlight Repeatedly Asks for Sign In
          PBK Level 6 Level 6 (2,605 points)

          Keep in mind that TestFlight is operating in an unusual way  between the sandbox environment and the production environment.  I would ignore the problem except to be SURE that you always call finishTransaction after a call to updatedTransactions.

            • Re: Beta App in TestFlight Repeatedly Asks for Sign In
              PianoBench Level 1 Level 1 (0 points)

              Thank you, PBK.

               

              We are calling finishTransaction at various points where we think appropriate. Do you--or anyone else--know more precisely whether similar, repeated sign-in requests are to be considered normal in TestFlight under any circumstance?

               

              Is this, perhaps, a system-level oddity that has crept in with iOS 9?

               

              George

              • Re: Beta App in TestFlight Repeatedly Asks for Sign In
                cugms Level 1 Level 1 (0 points)

                We are experiencing the same thing with our beta app using TestFlight and an in-app purchase. The code is calling finishTransaction, so we are suspecting a bug with TestFlight or iOS.

                  • Re: Beta App in TestFlight Repeatedly Asks for Sign In
                    cugms Level 1 Level 1 (0 points)

                    I opened a case with Apple about this, and got this explanation:

                     

                    "This is working as designed. The same user name may be used in both production and sandbox but since they are actually separate environments, you need to logout of sandbox and login again to production before using production features. It is not possible to be logged into both environments at once."

                     

                    So yes, this is a bad user experience for TestFlight users making in-app purchases, but it's the way it is.

                • Re: Beta App in TestFlight Repeatedly Asks for Sign In
                  funkenstrahlen Level 1 Level 1 (0 points)

                  I just discovered this thread because I have the exact same issue. However I have not released the app yet to production as I fear the popups will also appear in production.

                   

                  Is there any way I can confirm the login popup issue is not happening in production before releasing it to all users?

                    • Re: Beta App in TestFlight Repeatedly Asks for Sign In
                      PBK Level 6 Level 6 (2,605 points)

                      Log out of your account before installing the app from test flight.  The request to log in should only occur when you attempt to make an IAP.  That request will be for a user in the sandbox.  If you get a pop up it means your code is trying to refresh the receipt in the background or you have unfinished transactions in that device.  To determine if it is the unfinsihed transactions then download the test flight app into a different device.

                      .

                        • Re: Beta App in TestFlight Repeatedly Asks for Sign In
                          funkenstrahlen Level 1 Level 1 (0 points)

                          Thanks for your response. I tried to debug this:

                           

                          * I do not refresh the receipt in background. The popup even occurs when I remove all of my IAP code.

                          * I did not use a separate sandbox account to test the subscription IAP. I downloaded the app from TestFlight and used my normal account as it is possible according to Apple. This will also use the sandbox backend tough.

                          * I checked for unfinished transactions: I listen to delegate calls on the PaymentQueue. Nothing. I even called restoreTransactions to replay all transactions and finish them in case, but everything looks correct.

                           

                          The request for password I see is for my actuall AppleID but in the sandbox environment.

                           

                           

                          The weird thing is: This seems to happen very randomly. Sometimes it takes 20s after I launch the app until the popup occurs. All of my code that has something to do with subscriptions is finished already (verified through logging). I feel like my code has NOTHING to do with this popup.

                           

                          I did not have this issue before working with IAP. However even installing an old version from TestFlight which does not have any IAP in it does bring up the popup now.

                           

                          I am really out of ideas why this does happen.