When I try to open the Storyboard Preview or run IBAgent-iOS
, I only get a black screen.
The log shows an error like this:
Encountered an error communicating with IBAgent-iOS.Failed to spawn IBAgent-iOS on iPhone 14 (iOS 16.2, Booting)Process spawn via launchd failed because device is not booted.Bad or unknown session: com.apple.CoreSimulator.SimDevice...
I tried deleting and recreating simulators, but the issue persisted with the iOS 16.2 Built-in runtime.
**How can I fix this?
**
Answer:
This happens because the iOS 16.2 Built-in runtime that ships with Xcode was corrupted/incomplete.
Even if you recreate the simulators, IBAgent-iOS
cannot boot the device, which causes the black screen in Storyboard Preview.
The fix was to install a clean runtime.
Open Xcode ā Settings ā Platforms.
Click + and install another runtime, e.g. iOS 16.0 Simulator (or 16.4/17.0 if available).
Restart Xcode and then start it again. Now be happy.
Explanation (why this happens)
The iOS 16.2 Built-in runtime is bundled inside Xcode and cannot be removed.
If it becomes corrupted (CoreSimulator data issue), IBAgent-iOS
fails to boot and Storyboard Preview shows only black.
Installing another runtime provides a fresh, working copy of the simulator, which fixes the issue.