Skip to content

Commit

Permalink
Add note to README about building and running in Xcode (#133)
Browse files Browse the repository at this point in the history
Test Plan:
- Ensure all CI checks pass
- Follow the steps in the new section, verify both start and run
commands work without any issues
  • Loading branch information
marciniwanicki authored Nov 23, 2024
1 parent 668c6d2 commit ede23eb
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,34 @@ Execute the commands below to run the project locally.
.build/debug/curie --help
```

### Build and Run in Xcode

The [Virtualization.framework](https://developer.apple.com/documentation/virtualization) requires the `com.apple.security.virtualization` entitlement to run correctly. Without this entitlement, certain commands, such as `start` or `run`, may fail and produce the following error:

```
Error: Invalid virtual machine configuration. The process doesn’t have the “com.apple.security.virtualization” entitlement.
Program ended with exit code: 1
```

To resolve this issue, you need to add the necessary entitlement to your app. Follow these steps to configure your Xcode project:

1. Open the Scheme Editor:
- In Xcode, go to the **Product** menu and select **Scheme** > **Edit Scheme**.

2. Add a Post-Build Action:
- In the Scheme editor, select the Build tab.
- Under the **Post-actions** section, click the **+** button and choose New Run Script Action.

3. Enter the Codesign Command:
- In the newly created **Run Script** action, enter the following command to apply the entitlement:

```sh
codesign --sign - --entitlements "$WORKSPACE_PATH/../../../Resources/curie.entitlements" --force "$TARGET_BUILD_DIR/curie"
```

4. Save and Build:
- Save the scheme changes and rebuild the project. The app should now have the necessary entitlement to run the virtual machine without errors.

## Attributions

We would like to thank the authors and contributors of the following projects:
Expand Down

0 comments on commit ede23eb

Please sign in to comment.