Tag: Xcode

Xcode Simulator: Unable to boot the Simulator

Xcode

When trying to start the simulator, I get the following error “Unable to boot the Simulator”:

Simulator Error: Unable to boot the Simulator

While searching through different resources on the internet, I came across the following solution that worked for me.

Note: my mac uses macOS Sonoma 14.4, Xcode 15.3 and Simulator 15.3. The solution might work for other systems as well, but the wording or location of the settings might be different.

1. Open “Settings > General > Storage”

Settings Storage

2. Open “Developer”

Open the “Developer” section by clicking on the info icon on the right. This will open a summary window which lists all developer files and its data size:

Settings "Developer > Xcode caches"

3. Delete “Xcode Caches”

Select the “Xcode Caches” entry and click on the “Delete…” button. This will clear the caches used by Xcode and the Simulator. After that, the Simulator should start/boot as before.

 

Xcode: how to disable an extension during app build

macbook on a desk

Sometimes the development version of an app includes multiple code e.g. an extension that should not be released yet. In this case, it’s possible to exclude the extension when building an app. This keeps all your code, but does not include the extension during the build phase.

To achieve this, simply open the Build Phases of your main app and remove the extension(s) from Dependencies and Embed App Extensions. You can add the extension later when required.

Below is a screenshot of the setting in Xcode.

screenshot of xcodes build phase settings

Photo by Clément Hélardot on Unsplash

 

Xcode fails to generate source files from intent definition files when using the Legacy Build System

The workaround for this problem is the following: First, add a Run Script phase before the Compile Sources phase of your target:

xcrun intentbuilderc generate -input ${SRCROOT}/PATH/TO/Intents.intentdefinition -output ${SRCROOT}/Intents -classPrefix "" -language Swift -swiftVersion 5.0

Then, add all of the generated files from the output path specified in the command above to all required targets in your project.

Source: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_release_notes