Xcode 13/iOS15 is taking longer than expected to launch, it shows a LLDB related message
Asked Answered
G

2

19

I am using Xcode 13 on a Macbook Pro (Intel/2019) with macOS Big Sur 11.6

I am building and launching the app on a connecting iPhone X running iOS 15.0, I am also running a UI test suite based on XCUITest while I do that.

The app takes extremely long to launch (2+ minutes), then it sits on the splash screen for another 2-3 minutes. Meanwhile, Xcode shows the alert attached:

Xcode 13:app is taking longer than expected

I have 2 questions:

  1. Is this a widespread Xcode 13 / iOS 15 issue?
  2. What does the message in the alert mean: "LLDB is likely reading from device memory to resolve symbols"? Is there anything I can do to reduce or avoid this wait?
Geneticist answered 28/9, 2021 at 18:26 Comment(1)
have the same problem – Hartebeest
O
34

For those that are not familiar with the command line, go into your terminal and you can do this command.

rm -r ~/Library/Developer/Xcode/iOS\ DeviceSupport

This will recursively delete everything in the file tree in the 'iOS DeviceSupport' folder.

The steps are

  1. Disconnect your device
  2. Quit Xcode
  3. Open a terminal window and run the above command.
  4. Open Xcode
  5. plug in your device and run your app.

The first time that you run the app will take a while as your computer re-obtains the information that you deleted, but subsequent runs of the app should work much faster. That is what worked for me.

Oleograph answered 20/7, 2022 at 20:19 Comment(1)
Still works in Feb 2024! – Otherdirected
S
16

Once your debug session is running, pause your app (or hit a breakpoint) and in the Debugger Console window, and do image list. This will list every binary / dylib / framework in the process, there will be as many as five hundred these days.

After the filename, if you see a hex address, then lldb has had to read all of the libraries out of memory on device startup. Xcode expands a local copy of all your device libraries on the Mac so lldb can find them there, instead of reading them from memory.

If you look in ~/Library/Developer/Xcode, there's a iOS DeviceSupport directory. You can remove it, re-launch Xcode and it will re-expand the libraries for your iOS etc devices as they're plugged in.

Stalag answered 29/9, 2021 at 5:58 Comment(2)
πŸ‘ thanks it's worked for me – Hartebeest
For someone facing with Xcode 14, then please check the directory correctly. Its ~/Library/Developer/Xcode not ~/Libraries/Developer/Xcode on macOS 13.0 – Lugansk

© 2022 - 2025 β€” McMap. All rights reserved.