-
Notifications
You must be signed in to change notification settings - Fork 918
Enable Xcode Debugger #8474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Xcode Debugger #8474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables Xcode debugger support for the Nextcloud desktop client by conditionally disabling hardened runtime and adding debug entitlements for Debug builds. This allows developers to attach Xcode's debugger to the NextcloudDev build created by mac-crafter, which is normally prevented by macOS security restrictions.
- Conditionally disables hardened runtime for Debug builds in CMake configuration
- Adds
com.apple.security.get-task-allowentitlement for Debug builds to allow debugger attachment - Configures entitlements template to include debug-specific entitlements when appropriate
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| CMakeLists.txt | Conditionally disables hardened runtime for Debug builds |
| admin/osx/CMakeLists.txt | Sets up debug entitlements variable based on build type |
| admin/osx/macosx.entitlements.cmake | Adds placeholder for debug entitlements in template |
|
While being completely unrelated to Linux app images, the failing check will most likely be resolved with #8475 which I will wait for to be integrated first. |
- Disable hardened runtime for debug builds. - Add required get-task-allow entitlement conditionally. Signed-off-by: Iva Horn <iva.horn@icloud.com>
88716a8 to
99e7603
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-8474.zip SHA256 checksum: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|



Due to security restrictions, a debugger cannot just attach to any process arbitrarily. Apps must not be hardened and their entitlements explicitly contain an entitlement which allows the retrieval of the task control port of a process.
This enables Xcode to successfully connect to the process of the NextcloudDev build by mac-crafter.
An example Xcode project and appropriate documentation how to leverage this to actually debug the Nextcloud desktop client in Xcode will follow.