App takes forever to launch on Xcode 13 Beta 2 and iOS 15 Beta 2

On Beta 2, on multiple devices, my app stays for 1-2 minutes in the launch screen when the debugger is attached. This used to take a second max in beta 1.

If I set a breakpoint, it stops at the end of the launch screen with the following backtrace:

Thread 1#0    0x00000001018266d4 in _dyld_debugger_notification ()
#1    0x0000000101809918 in dyld4::lldb_image_notifier(dyld_image_mode, unsigned int, dyld_image_info const*) ()
#2    0x00000001017f3334 in dyld4::RuntimeState::notifyDebuggerLoad(dyld3::Array<dyld4::Loader const*> const&) ()
#3    0x00000001017f68c8 in dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) ()
#4    0x000000010180980c in start ()

Running from the home screen without Xcode attached is fast as always. Does anyone have an idea where I can start looking? This makes debugging very hard...

Accepted Answer

I found the answer: Delete ~/Library/Developer/Xcode/iOS\ DeviceSupport, restart Xcode and let it re-build the Device support. Afterwards the app starts with the debugger attached as quickly as before.

The accepted suggestion does not work for me. Anyone got any ideas?

In iOS15 beta4, every time I tried to turn off the Apple Watch when I encountered this issue, I was able to fix it, but in beta5, there is no longer any way to fix the issue found on the web.

It works. Thanks a lot!

It did not work for me. I tried multiple times to delete the ~/Library/Developer/Xcode/iOS\ DeviceSupport, restart Xcode. Delete cache, unpair the device and re-pair it. After trying all of the above I deselected Product -> Scheme -> Edit scheme -> Select Run (left column) -> untick Debug executable Not the best solution probably but waiting for Apple to fix this. It seems a bug...

it is particularly worst with this M1 2020, this machine is for kids not for developers

App takes forever to launch on Xcode 13 Beta 2 and iOS 15 Beta 2
 
 
Q