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. Dismiss Notice

Question app hangs when waiting to attach debugger on iOS

Discussion in 'iOS and tvOS' started by Faustob64, May 16, 2023.

  1. Faustob64

    Faustob64

    Joined:
    Nov 28, 2022
    Posts:
    17
    I am trying to debug my app on a IOS device attached to my MacBook M1.
    I build the project in Unity 2021.3.25f1 with the Symlink Sources, Development Build, Script Debugging and Wait for Managed Debugger flags all set. Then in XCode 14.3 i build the project, attach an iPhone via USB, and run the app. I expect to see the "You can attach a debugger now" popup, but the app hangs and I only see a black screen (not even the Unity splash screen). The last message on the XCode console is "
    Initialize engine version: 2021.3.25f1".

    I tried the various incantations I could find on the web... deleting all file in ~/Library/Developer/XCode, setting/unsetting the Debug flag in the Run Scheme, restarting everything, but to no avail.

    Has anyone else seen this? Any pointers?
     
  2. IoannisFMG

    IoannisFMG

    Joined:
    Sep 4, 2020
    Posts:
    7
    This is caused by the Wait For Managed Debugger flag. I'm having the same issue with xCode 14.2 and unity 2022.2.19f1.
    The layout debugger in xCode shows that the popup is there, but it does not appear. It's looks like the splash screen is always on top.

    The last entry in the log is
    Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x10532f620>.
     
    Last edited: May 25, 2023
  3. Claudia_Schulz

    Claudia_Schulz

    Joined:
    May 12, 2020
    Posts:
    6
    I ran into the very same issue today after updating to Unity 2021.3.25 (been on 2021.2.11 before) :) The popup will only appear/become visible when the app is put into the background for a bit. But even if the popup becomes visible, it can't be interacted with, tapping the "Ok" button does nothing. And then if the app is left open for a while it will crash (it gets terminated by the iOS scene create watchdog for taking too long) .

    I disabled the flag for now and it seems to be fine now.
     
  4. Faustob64

    Faustob64

    Joined:
    Nov 28, 2022
    Posts:
    17
    I submitted a bug to unity. Will update this thread when I hear back.
    '
     
  5. qball13z

    qball13z

    Joined:
    Nov 30, 2013
    Posts:
    15
    Glad to see it's not just me, using 2021.3.27f1, hopefully @Faustob64 has some good news!
     
  6. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    Same exact problem here. Are you mixing pro/free licenses on the same computer? just curious
     
  7. NavYil

    NavYil

    Joined:
    Nov 13, 2019
    Posts:
    2
    Same issue.But it can work on unity 2021.3.23f1.
     
  8. Faustob64

    Faustob64

    Joined:
    Nov 28, 2022
    Posts:
    17
    UDPATE: My bug was rejected as DUPLICATE, somebody had already submitted it. Hopefully it's being addressed.
     
  9. IoannisFMG

    IoannisFMG

    Joined:
    Sep 4, 2020
    Posts:
    7
    qball13z and Faustob64 like this.