Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Constantly being asked for iTunes password on iOS

Discussion in 'Unity IAP' started by gtzpower, Feb 23, 2018.

  1. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    Hi everyone,

    I am being prompted to enter my iTunes password constantly with codeless IAP in my project. I get prompted when the app launches, I get prompted multiple times during a purchase, I get prompted when the device is locked, and I get prompted on the home screen (all prompts go away if I uninstall the app). These are sandbox prompts. I have tried creating a build that only includes an empty scene, and the prompts still appear.

    The problem occurs on iOS 11.2.5 and 11.2.6 on the iPhone SE, and iOS 11.0.1 on an iPad Air 2 (the 2 devices are using different iTunes accounts). I do NOT have the problem on an iPad Mini 1 running iOS 9.3.5 using the same iTunes account as the iPhone SE. On the iPad mini everything works perfectly. The app is being built with Unity 2017.3.1f1 and Unity IAP 1.16.0. I had the same issue with Unity 2017.3.0f3 and IAP 1.15.0.

    Here is the Xcode log from running the app with an empty scene on the iPhone SE (the iTunes password prompt came up when the app launched):

    ================================================
    2018-02-23 14:21:22.795254-0600 myapp[361:15651] [DYMTLInitPlatform] platform initialization successful
    2018-02-23 14:21:22.826285-0600 myapp[361:15494] UnityIAP UnityEarlyTransactionObserver: Created
    2018-02-23 14:21:22.826842-0600 myapp[361:15494] UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events
    2018-02-23 14:21:22.889238-0600 myapp[361:15494] -> registered mono modules 0x1037dda00
    2018-02-23 14:21:23.120130-0600 myapp[361:15494] [Accessibility] ****************** Loading GAX Client Bundle ****************
    -> applicationDidFinishLaunching()
    2018-02-23 14:21:24.989339-0600 myapp[361:15494] Metal GPU Frame Capture Enabled
    2018-02-23 14:21:24.990872-0600 myapp[361:15494] Metal API Validation Disabled
    2018-02-23 14:21:25.134996-0600 myapp[361:15494] [MC] Lazy loading NSBundle MobileCoreServices.framework
    2018-02-23 14:21:25.135175-0600 myapp[361:15494] [MC] Loaded MobileCoreServices.framework
    2018-02-23 14:21:25.161799-0600 myapp[361:15494] UnityIAP UnityEarlyTransactionObserver: Added to the payment queue
    -> applicationDidBecomeActive()
    GfxDevice: creating device client; threaded=1
    Initializing Metal device caps: Apple A9 GPU
    Initialize engine version: 2017.3.1f1 (fc1d3344e6ea)
    FMOD failed to initialize the output device, attempting to initialize the null output.
    (Filename: Line: 1245)

    WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Setting to default shader.
    Setting up 1 worker threads for Enlighten.
    Thread -> id: 16edcf000 -> priority: 1
    UnloadTime: 2.878791 ms
    2018-02-23 14:21:27.003332-0600 myapp[361:15494] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
    2018-02-23 14:21:27.004680-0600 myapp[361:15494] [MC] Reading from public effective user settings.
    2018-02-23 14:21:27.037139-0600 myapp[361:15494] E/UnityAds: +[UnityAds initialize:delegate:testMode:] (line:48) :: Unity ads init: invalid argument, halting init
    -> applicationWillResignActive()
    -> applicationDidEnterBackground()
    2018-02-23 14:21:27.121012-0600 myapp[361:15494] [Common] _BSMachError: port 7c07; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"
    =======================================

    Does anyone have any suggestions? I did find another thread that details the multiple prompts upon purchasing as being a sandbox only issue ([Closed] Password prompt pops up several times for some users [iOS]), but the other prompts were not mentioned, and this thread was started in 2016, so I am hesitant to release the app and cross my fingers...

    One last detail. It doesn't matter how many times I supply my password. I continue to receive prompts.
     
  2. ButcherBolzi

    ButcherBolzi

    Joined:
    May 31, 2014
    Posts:
    17
    This is really irritating, I don't know is this only sandbox failure, but after I have made some sandbox purchases for testing it start to ask password multiple times. Last time I did not used iPad at couple of days and then when I opened it, it asked password ten times in a row! Now I don't bother write password any more.
     
  3. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    Can anyone at least confirm that this is just a sandbox issue that goes away when deployed? It seems to work well on iOS 9, so if I can get that much of a confirmation, I suppose I will just clench my cheeks and release it. :(

    Edit: come to think of it, I recently released an app that uses Prime31 for IAP a few months back and it did not have these issues, so I am again very skeptic about this codeless IAP.. Maybe I will switch back to that plugin. Not what I want to do that by any means, but if it works....
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    We have many customers successfully using Unity IAP on iOS when deployed to production.
     
  5. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    Thanks for the reply Jeff. Have you heard of any customers having these problems when not in production (TestFlight/sandbox mode)? If not, do you have any troubleshooting tips for codeless IAP?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
  7. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    I managed to resolve this along with some other issues:
    https://forum.unity.com/threads/how-should-codeless-iap-restore-work.522234/#post-3435399

    Basically, repurchasing the non-consumable IAP, over LTE, using the non-codeless implementation in the IAP Demo scene that comes with the purchasing package, resolved it. I am not sure if all of those steps were required, but that's what I ended up with. I will post back if I run into the problem again and learn more about what is causing it.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @gtzpower If your WiFi is using a proxy, firewall or VPN for example, you might not be able to reliably reach the respective stores. I will check to see if there might be an easy device browser test that you can run with the appropriate URL to confirm. To rule out an intermittent store issue, does it still reproduce?
     
  9. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, I'm aware of that conversation, you had mentioned LTE vs WiFi differences in this thread.
     
  11. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    Yea, I wasn't sure which changes made the difference, so I just mentioned them all for the next person who comes across the issue. After further investigation, I learned that the lack of consumption of the purchase was the root cause of the password prompts when I am not using the app. I still get multiple prompts when purchasing, but this does seem to be related to sandbox from what I have read, so I was just clarifying that detail.
     
  12. daviddaws

    daviddaws

    Joined:
    Sep 7, 2019
    Posts:
    1
    I have also faced the same issue with my iPhone 8. Even after entering the correct password also it asked for a password. Then I tried on my iPad. It was properly working on there. I didn't know why this issue occurred on my iOS. Then by following https://itunessupport.org/blog/how-to-restore-iphone-without-updating/ I got the proper solution.