Search results for

“codesign”

3,223 results found

Post

Replies

Boosts

Views

Activity

Code signing of dylib for use under iOS
We are in the process of developing our text to speech and speech analysis tools over to mobile platforms = cross platform development. The tools are written in C++ and are compiled using CMake with an ios specific toolchain targetting the correct platform sdk. One of the parts of this toolkit is the dynamic loading of language specific dylibs via dlopen. I have seen that this can only be done if the dylib has been signed with the same certificate as the application. Note that we are still using free developer certificates generated automatically by XCode. When I run the test application, at the point where the dylib should be loaded via dlopen, the load fails and dlerror returns the following : dlopen(<path to dylib>, 0x0001): code signature invalid (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0205D0F0, codeBlobSize=0x000453B0 for '<path to dylib>' However, when I check the code signature with : codesign -d --verbose=2 --extract-certificates <path> I g
20
0
11k
Mar ’23
Reply to Using Processor Trace on Non-Xcode Built Binary
Thanks so much for the response! clang and rustc (by design on Rust' part, to be clear!) are sufficiently similar that it was pretty easy to translate between C++ and Rust! Your tips/suggestions almost worked for me, except that the binary would be sigkilled'd immediately after launch. I did some rubber-duck debugging using Claude, and it—rather impressively!—pointed out in https://claude.ai/share/5a4ca3ca-9e98-4e2a-b9ae-71b49c6983cf that the entitlement I needed to use was com.apple.security.get-task-allow, not com.apple.security-get-task-allow. Instruments' diagnostic contained a typo! Once I fixed this typo, I was able to use the Processor Trace instrument via xctrace. Of course, since this is beta software, which I hit a few bugs, which I'll cover at the end of this post. Apple silicon code must be signed, so the linker automatically applies an ad-hoc signature. You can see this if you dump the hello tool before re-signing it: [dump redacted] If you’re going to re-sign the binary anyway, you can disable l
Jul ’25
Notarization and Stapling Failing for Signed PKG & DMG with Error 65 Despite Successful Notary Submission
Dear Apple Developer Technical Support, I am encountering an issue with notarizing and stapling both PKG and DMG installers for our Electron-based macOS application COSGrid. Despite receiving successful notarization submission responses via notarytool, the stapling process fails with Error 65. Environment: App Name: COSGrid Bundle Identifier: com.cosgrid.pkg.COSGrid Developer ID Team ID: YB8S2XZ98K macOS Version: macOS [15.1] Xcode Version: [16.0 (16A242d)] Workflow Summary: For PKG: Build via yarn build (Vite + Electron Builder) Package with pkgbuild Sign using productsign Submit for notarization: xcrun notarytool submit COSGridMZA-2.1.10-arm64.pkg --apple-id ... --team-id YB8S2XZ98K --password ... --wait Conducting pre-submission checks for COSGridMZA-2.1.10-arm64.pkg and initiating connection to the Apple notary service... Submission ID received id: a8ff8e09-1ab4-49ed-9f6b-4afb9f09e53a Upload progress: 100.00% (235 MB of 235 MB) Successfully uploaded file id: a8ff8e09-1ab4-49ed-9f6b-4afb9f09e53a path: /Use
1
0
126
Jul ’25
Reply to Using Processor Trace on Non-Xcode Built Binary
I’m not able to help you with third-party tools, so I’m going to base my response on how you would achieve this goal when using Clang directly from Terminal. I’m hoping that you can map this to your third-party tooling. Also, I’m basing my response on the trivial test case described in Investigating Third-Party IDE Integration Problems. The final point of that is a built executable with no entitlements: % codesign -d --entitlements - hello Executable=/Users/quinn/Test/hello % To add the get-task-allow entitlement, first create a property list with the right values: % plutil -create xml1 hello.entitlements % plutil -insert 'com.apple.security.get-task-allow' -bool true hello.entitlements % cat hello.entitlements … com.apple.security.get-task-allow Note Entitlement files are XML property lists. While you can edit these as text, I generally recommend that you use our tools (plutil and also PlistBuddy; both have man pages) because it’s easy to mess things up if you edit them by hand. Now re-sign the
Jul ’25
App Fails to Launch on Another Mac with Error -10810 After Codesign and Notarization
I exported an app from an Xcode project using the Archive feature. After signing and notarizing it, the app runs normally on my local machine. However, after packaging it with create-dmg or ditto and distributing it to another Mac, I get an error saying the application cannot run. When I execute the command open xxx.app in Terminal, it shows _LSOpenURLsWithCompletionHandler() failed for the application /Applications/Maxi PC Suite.app with error -10810. Does anyone know why this is happening? codesign and notarization info: codesign -vvv Maxi PC Suite.app ...... Maxi PC Suite.app: valid on disk Maxi PC Suite.app: satisfies its Designated Requirement syspolicy_check distribution Maxi PC Suite.app App passed all pre-distribution checks and is ready for distribution.
Topic: Code Signing SubTopic: General
1
0
538
Dec ’24
Binary is improperly signed but only on macOS 11
Hi all, I’ve run into a signing/entitlements problem that shows up only on Big Sur (11.x). The very same .app launches perfectly on Monterey (12), Ventura (13), Sonoma (14 / 14.5) and Sequoia (15). Failure on macOS 11 com.apple.xpc.launchd[1] (application.app.myapp.exams.566312.566318[1602]): removing service since it exited with consistent failure – OS_REASON_CODESIGNING | When validating …/MyAppNameBlurred 3.13.1.app/Contents/MacOS/MyAppNameBlurred 3.13.1: Code has restricted entitlements, but the validation of its code signature failed. Unsatisfied Entitlements: Binary is improperly signed. Launching from Terminal: open -a /Users/admin/Downloads/MyAppNameBlurred 3.13.1.app kLSNoLaunchPermissionErr (-10826) | Launchd job spawn failed with error: 153 What I’ve already checked # signature itself codesign -dvvv /Users/admin/Downloads/MyAppNameBlurred 3.13.1.app # => valid, Authority = Developer ID Application, runtime enabled # full deep/strict verification codesign --verify --deep --stric
3
0
344
Jul ’25
Gatekeeper disallowing directly distributed app
This is a continuation of my own old post that became inactive to regain traction. I am trying to resolve issues that arise when distributing a macOS app with a SysExt Network Extension (Packet Tunnel) outside the App Store using a Developer ID Certificate. To directly distribute the app, I start with exporting the .app via Archive in Xcode. After that, I create a new Developer ID provisioning profile for both the app and sysext and replace the embedded ones in the .app package. After I have replaced the provisioning profiles and the have the entitlements files ready, I start signing the frameworks, sysext and parent app. codesign --force --options runtime --timestamp --sign Developer ID Application: .app/Contents/Library/SystemExtensions/.systemextension/Contents/Frameworks/.framework/Versions/A/ codesign --force --options runtime --timestamp --sign Developer ID Application: .app/Contents/Frameworks/.framework/ codesign --force --options runtime --entitlements dist-vpn.entitlement
3
0
321
Jul ’25
Guideline 2.4.5(i) - Performance And Indelible the entitlements
我没有勾选entitlements 中的” com.apple.security.network.server“和” com.apple.security.device.usb“,但是确实在打包时又自动出现在包里,我现在无法解决这个问题,我需要帮助,谢谢 我的.entitlements 文件如下: 排查命令: codesign -d --entitlements :- ./Device Guard.app Executable=/Users/zhanghai/Library/Developer/Xcode/DerivedData/MacGuardApp-fvfnspyxcojxojdfclyohrnupgsh/Build/Products/Debug/Device Guard.app/Contents/MacOS/Device Guard warning: Specifying ':' in the path is deprecated and will not work in a future release
5
0
135
Jun ’25
Reply to jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
The jpackage command tool provided by Oracle: It specifies some options for MacOS code signing: --mac-sign --mac-package-signing-prefix ST_DFG2D_ARM --mac-signing-key-user-name Pierre Bierre that it reformats when it runs and calls Apple's codesign. Maybe you can show me how to translate these options into a discrete call to codesign? [14:06:05.820] java.io.IOException: Command [/usr/bin/codesign, -s, Developer ID Application: Pierre Bierre (SL7L4YU8GT), -vvvv, --timestamp, --options, runtime, --prefix, ST_DFG2D_ARM, /var/folders/v7/06pp2_5d6gz9593k96n2z0v40000gn/T/jdk.jpackage8264959517592888307/images/image-10714515757680011645/DataflowGeometry2D.app/Contents/runtime/Contents/Home/lib/libnet.dylib] exited with 1 code I tried this guess: codesign --sign Pierre Bierre (SL7L4YU8GT) --force --options runtime --verbose --timestamp ~/DFG2D_MacOS_Manufacturing/MacOSInstallers/DFG2D_Mac_J17010_295 The response was: error: The specified item could not be found in the keychain. Not
Topic: Code Signing SubTopic: General
Jun ’25
Reply to Guideline 2.4.5(i) - Performance And Indelible the entitlements
codesign -d --entitlements - /Users/zhanghai/Library/Developer/Xcode/Archives/2025-06-26/Device Guard 2025-6-26, 11.00.xcarchive/Products/Applications/Device Guard.app Executable=/Users/zhanghai/Library/Developer/Xcode/Archives/2025-06-26/Device Guard 2025-6-26, 11.00.xcarchive/Products/Applications/Device Guard.app/Contents/MacOS/Device Guard [Dict] [Key] com.apple.security.app-sandbox [Value] [Bool] true [Key] com.apple.security.device.bluetooth [Value] [Bool] true [Key] com.apple.security.device.usb [Value] [Bool] true [Key] com.apple.security.network.client [Value] [Bool] true [Key] com.apple.security.network.server [Value] [Bool] true I guess the problem is with step 1. So what can i do for the problem? Thank you for much!
Topic: Code Signing SubTopic: Entitlements Tags:
Jun ’25
Reply to Guideline 2.4.5(i) - Performance And Indelible the entitlements
OK. The .entitlements file is source code. Xcode does a lot of processing on its content before it passes it along to codesign to apply to your app. So it’s not uncommon to see problems like this. Most folks upload there app in two stages: Choose Product > Archive to create an Xcode archive (.xcarchive) of the app. In the Xcode organiser, select that archive and click Distribute App to actually upload the app. Are you doing that here? If so, the Xcode archive makes a good test point, that is, you can dump the entitlements in the archive to see if they’re correct. If they are, you know that the problem was with step 2. Alternatively, if the entitlements in the archive are wrong, you know the problem is with step 1. To dump the entitlements in the archive: Select it in the Xcode organiser. Control click and choose Show in Finder. In Terminal, dump the entitlements of the enclosed app. For example, here’s what I see in step 3 for a test app I created in my office: % codesign -d --entitlement
Topic: Code Signing SubTopic: Entitlements Tags:
Jun ’25
Gatekeeper stops directly distributed MacOS app with Network Extension
Is it possible to directly distribute a macOS app with a Developer ID Certificate that belongs to a different team? I am trying to resolve issues that arise when distributing a macOS app with a Network Extension (Packet Tunnel) outside the App Store using a Developer ID Certificate from a different team than the app’s provisioning profiles and entitlements. I started by attempting Direct Distribution in Xcode with automatic signing. However, it fails with the following message: Provisioning profile Mac Team Direct Provisioning Profile: ” failed qualification checks: Profile doesn't match the entitlements file's value for the com.apple.developer.networking.networkextension entitlement. I suspect the issue is that the provisioning profile allows packet-tunnel-provider-systemextension, whereas the entitlements generated by Xcode contain packet-tunnel-provider. When I manually modify the .entitlements file to include the -systemextension suffix, the project fails to build because Xcode does not recognize the modi
3
0
599
Jun ’25
Reply to jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
[quote='790330021, pbierre, /thread/790330, /profile/pbierre'] The error feedback from codesign is nonspecific and inactionable. [/quote] Looking at the log you posted I don’t actually see any error information from codesign. It seems that your tooling runs codesign which then exits with status 1, and that’s it. Normally when codesign fails it prints something to stderr. Is that not the case here? Or did it print something but it’s not in the log you included? ps My best guess, based on the info you included, is that this error will be something like this: % codesign -s …all your other arguments elided… libnet.dylib libnet.dylib: is already signed That’s due to a subtle difference between Intel and Apple silicon. On Apple silicon all code is signed by default. If you using an open source toolchain to build your code then it gets ad-hoc signed by the linker. That means that, when you go to sign it, the signing fails because it’s already signed, and hence this error.
Topic: Code Signing SubTopic: General
Jun ’25
Reply to Network extension authorization dialog not appearing
I am still digesting that, but I was about to upload another sysdiagnose -- this one from a githubs action VM that demonstrated the same behaviour (but which was a clean install of our app). There was a sysdiagnose from macOS 13.7.6 uploaded which I did look over. Unfortunately, that appears to be a different issue, as sysextd is actually crashing before before it starts authorizing. This does appear to be a known issue (r.99777199), however, there haven't been really been reports post-macOS 13. If you're seeing this crash on more recent releases then that's worth further investigations/bugs, but I don't think there's a lot to be done on macOS 13. Each build gets a new number; for annoying reasons, the build is done twice (Apple Silicon and Intel), lipo'd together, and then codesigned again. For what it's worth, I don't actually have any problem with incrementing all component versions, even when a give component doesn't change. Given the possible complexity of component interactions, it's entirely p
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’25
Reply to Network extension authorization dialog not appearing
I am still digesting that, but I was about to upload another sysdiagnose -- this one from a githubs action VM that demonstrated the same behaviour (but which was a clean install of our app). But I think I'll try to fix some of the obvious-fixable issues there. We don't have UF_IMMUTABLE set on anything, and the one process in the suite that uses ESF doesn't protect anything in /Library/SystemExtensions. That process needs the TCC, but without MDM, it requires manual intervention by the user. I don't think it does it on the github actions tests. Each build gets a new number; for annoying reasons, the build is done twice (Apple Silicon and Intel), lipo'd together, and then codesigned again. The crashes you note are either segfaults or reference count crashes, and should not happen -- it seems to be an issue with XPC. The code in question is written in ObjC.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’25
Code signing of dylib for use under iOS
We are in the process of developing our text to speech and speech analysis tools over to mobile platforms = cross platform development. The tools are written in C++ and are compiled using CMake with an ios specific toolchain targetting the correct platform sdk. One of the parts of this toolkit is the dynamic loading of language specific dylibs via dlopen. I have seen that this can only be done if the dylib has been signed with the same certificate as the application. Note that we are still using free developer certificates generated automatically by XCode. When I run the test application, at the point where the dylib should be loaded via dlopen, the load fails and dlerror returns the following : dlopen(<path to dylib>, 0x0001): code signature invalid (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0205D0F0, codeBlobSize=0x000453B0 for '<path to dylib>' However, when I check the code signature with : codesign -d --verbose=2 --extract-certificates <path> I g
Replies
20
Boosts
0
Views
11k
Activity
Mar ’23
Reply to Using Processor Trace on Non-Xcode Built Binary
Thanks so much for the response! clang and rustc (by design on Rust' part, to be clear!) are sufficiently similar that it was pretty easy to translate between C++ and Rust! Your tips/suggestions almost worked for me, except that the binary would be sigkilled'd immediately after launch. I did some rubber-duck debugging using Claude, and it—rather impressively!—pointed out in https://claude.ai/share/5a4ca3ca-9e98-4e2a-b9ae-71b49c6983cf that the entitlement I needed to use was com.apple.security.get-task-allow, not com.apple.security-get-task-allow. Instruments' diagnostic contained a typo! Once I fixed this typo, I was able to use the Processor Trace instrument via xctrace. Of course, since this is beta software, which I hit a few bugs, which I'll cover at the end of this post. Apple silicon code must be signed, so the linker automatically applies an ad-hoc signature. You can see this if you dump the hello tool before re-signing it: [dump redacted] If you’re going to re-sign the binary anyway, you can disable l
Replies
Boosts
Views
Activity
Jul ’25
Notarization and Stapling Failing for Signed PKG & DMG with Error 65 Despite Successful Notary Submission
Dear Apple Developer Technical Support, I am encountering an issue with notarizing and stapling both PKG and DMG installers for our Electron-based macOS application COSGrid. Despite receiving successful notarization submission responses via notarytool, the stapling process fails with Error 65. Environment: App Name: COSGrid Bundle Identifier: com.cosgrid.pkg.COSGrid Developer ID Team ID: YB8S2XZ98K macOS Version: macOS [15.1] Xcode Version: [16.0 (16A242d)] Workflow Summary: For PKG: Build via yarn build (Vite + Electron Builder) Package with pkgbuild Sign using productsign Submit for notarization: xcrun notarytool submit COSGridMZA-2.1.10-arm64.pkg --apple-id ... --team-id YB8S2XZ98K --password ... --wait Conducting pre-submission checks for COSGridMZA-2.1.10-arm64.pkg and initiating connection to the Apple notary service... Submission ID received id: a8ff8e09-1ab4-49ed-9f6b-4afb9f09e53a Upload progress: 100.00% (235 MB of 235 MB) Successfully uploaded file id: a8ff8e09-1ab4-49ed-9f6b-4afb9f09e53a path: /Use
Replies
1
Boosts
0
Views
126
Activity
Jul ’25
Reply to Using Processor Trace on Non-Xcode Built Binary
I’m not able to help you with third-party tools, so I’m going to base my response on how you would achieve this goal when using Clang directly from Terminal. I’m hoping that you can map this to your third-party tooling. Also, I’m basing my response on the trivial test case described in Investigating Third-Party IDE Integration Problems. The final point of that is a built executable with no entitlements: % codesign -d --entitlements - hello Executable=/Users/quinn/Test/hello % To add the get-task-allow entitlement, first create a property list with the right values: % plutil -create xml1 hello.entitlements % plutil -insert 'com.apple.security.get-task-allow' -bool true hello.entitlements % cat hello.entitlements … com.apple.security.get-task-allow Note Entitlement files are XML property lists. While you can edit these as text, I generally recommend that you use our tools (plutil and also PlistBuddy; both have man pages) because it’s easy to mess things up if you edit them by hand. Now re-sign the
Replies
Boosts
Views
Activity
Jul ’25
App Fails to Launch on Another Mac with Error -10810 After Codesign and Notarization
I exported an app from an Xcode project using the Archive feature. After signing and notarizing it, the app runs normally on my local machine. However, after packaging it with create-dmg or ditto and distributing it to another Mac, I get an error saying the application cannot run. When I execute the command open xxx.app in Terminal, it shows _LSOpenURLsWithCompletionHandler() failed for the application /Applications/Maxi PC Suite.app with error -10810. Does anyone know why this is happening? codesign and notarization info: codesign -vvv Maxi PC Suite.app ...... Maxi PC Suite.app: valid on disk Maxi PC Suite.app: satisfies its Designated Requirement syspolicy_check distribution Maxi PC Suite.app App passed all pre-distribution checks and is ready for distribution.
Topic: Code Signing SubTopic: General
Replies
1
Boosts
0
Views
538
Activity
Dec ’24
Binary is improperly signed but only on macOS 11
Hi all, I’ve run into a signing/entitlements problem that shows up only on Big Sur (11.x). The very same .app launches perfectly on Monterey (12), Ventura (13), Sonoma (14 / 14.5) and Sequoia (15). Failure on macOS 11 com.apple.xpc.launchd[1] (application.app.myapp.exams.566312.566318[1602]): removing service since it exited with consistent failure – OS_REASON_CODESIGNING | When validating …/MyAppNameBlurred 3.13.1.app/Contents/MacOS/MyAppNameBlurred 3.13.1: Code has restricted entitlements, but the validation of its code signature failed. Unsatisfied Entitlements: Binary is improperly signed. Launching from Terminal: open -a /Users/admin/Downloads/MyAppNameBlurred 3.13.1.app kLSNoLaunchPermissionErr (-10826) | Launchd job spawn failed with error: 153 What I’ve already checked # signature itself codesign -dvvv /Users/admin/Downloads/MyAppNameBlurred 3.13.1.app # => valid, Authority = Developer ID Application, runtime enabled # full deep/strict verification codesign --verify --deep --stric
Replies
3
Boosts
0
Views
344
Activity
Jul ’25
Gatekeeper disallowing directly distributed app
This is a continuation of my own old post that became inactive to regain traction. I am trying to resolve issues that arise when distributing a macOS app with a SysExt Network Extension (Packet Tunnel) outside the App Store using a Developer ID Certificate. To directly distribute the app, I start with exporting the .app via Archive in Xcode. After that, I create a new Developer ID provisioning profile for both the app and sysext and replace the embedded ones in the .app package. After I have replaced the provisioning profiles and the have the entitlements files ready, I start signing the frameworks, sysext and parent app. codesign --force --options runtime --timestamp --sign Developer ID Application: .app/Contents/Library/SystemExtensions/.systemextension/Contents/Frameworks/.framework/Versions/A/ codesign --force --options runtime --timestamp --sign Developer ID Application: .app/Contents/Frameworks/.framework/ codesign --force --options runtime --entitlements dist-vpn.entitlement
Replies
3
Boosts
0
Views
321
Activity
Jul ’25
Guideline 2.4.5(i) - Performance And Indelible the entitlements
我没有勾选entitlements 中的” com.apple.security.network.server“和” com.apple.security.device.usb“,但是确实在打包时又自动出现在包里,我现在无法解决这个问题,我需要帮助,谢谢 我的.entitlements 文件如下: 排查命令: codesign -d --entitlements :- ./Device Guard.app Executable=/Users/zhanghai/Library/Developer/Xcode/DerivedData/MacGuardApp-fvfnspyxcojxojdfclyohrnupgsh/Build/Products/Debug/Device Guard.app/Contents/MacOS/Device Guard warning: Specifying ':' in the path is deprecated and will not work in a future release
Replies
5
Boosts
0
Views
135
Activity
Jun ’25
Reply to jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
The jpackage command tool provided by Oracle: It specifies some options for MacOS code signing: --mac-sign --mac-package-signing-prefix ST_DFG2D_ARM --mac-signing-key-user-name Pierre Bierre that it reformats when it runs and calls Apple's codesign. Maybe you can show me how to translate these options into a discrete call to codesign? [14:06:05.820] java.io.IOException: Command [/usr/bin/codesign, -s, Developer ID Application: Pierre Bierre (SL7L4YU8GT), -vvvv, --timestamp, --options, runtime, --prefix, ST_DFG2D_ARM, /var/folders/v7/06pp2_5d6gz9593k96n2z0v40000gn/T/jdk.jpackage8264959517592888307/images/image-10714515757680011645/DataflowGeometry2D.app/Contents/runtime/Contents/Home/lib/libnet.dylib] exited with 1 code I tried this guess: codesign --sign Pierre Bierre (SL7L4YU8GT) --force --options runtime --verbose --timestamp ~/DFG2D_MacOS_Manufacturing/MacOSInstallers/DFG2D_Mac_J17010_295 The response was: error: The specified item could not be found in the keychain. Not
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
Jun ’25
Reply to Guideline 2.4.5(i) - Performance And Indelible the entitlements
codesign -d --entitlements - /Users/zhanghai/Library/Developer/Xcode/Archives/2025-06-26/Device Guard 2025-6-26, 11.00.xcarchive/Products/Applications/Device Guard.app Executable=/Users/zhanghai/Library/Developer/Xcode/Archives/2025-06-26/Device Guard 2025-6-26, 11.00.xcarchive/Products/Applications/Device Guard.app/Contents/MacOS/Device Guard [Dict] [Key] com.apple.security.app-sandbox [Value] [Bool] true [Key] com.apple.security.device.bluetooth [Value] [Bool] true [Key] com.apple.security.device.usb [Value] [Bool] true [Key] com.apple.security.network.client [Value] [Bool] true [Key] com.apple.security.network.server [Value] [Bool] true I guess the problem is with step 1. So what can i do for the problem? Thank you for much!
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Guideline 2.4.5(i) - Performance And Indelible the entitlements
OK. The .entitlements file is source code. Xcode does a lot of processing on its content before it passes it along to codesign to apply to your app. So it’s not uncommon to see problems like this. Most folks upload there app in two stages: Choose Product > Archive to create an Xcode archive (.xcarchive) of the app. In the Xcode organiser, select that archive and click Distribute App to actually upload the app. Are you doing that here? If so, the Xcode archive makes a good test point, that is, you can dump the entitlements in the archive to see if they’re correct. If they are, you know that the problem was with step 2. Alternatively, if the entitlements in the archive are wrong, you know the problem is with step 1. To dump the entitlements in the archive: Select it in the Xcode organiser. Control click and choose Show in Finder. In Terminal, dump the entitlements of the enclosed app. For example, here’s what I see in step 3 for a test app I created in my office: % codesign -d --entitlement
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Jun ’25
Gatekeeper stops directly distributed MacOS app with Network Extension
Is it possible to directly distribute a macOS app with a Developer ID Certificate that belongs to a different team? I am trying to resolve issues that arise when distributing a macOS app with a Network Extension (Packet Tunnel) outside the App Store using a Developer ID Certificate from a different team than the app’s provisioning profiles and entitlements. I started by attempting Direct Distribution in Xcode with automatic signing. However, it fails with the following message: Provisioning profile Mac Team Direct Provisioning Profile: ” failed qualification checks: Profile doesn't match the entitlements file's value for the com.apple.developer.networking.networkextension entitlement. I suspect the issue is that the provisioning profile allows packet-tunnel-provider-systemextension, whereas the entitlements generated by Xcode contain packet-tunnel-provider. When I manually modify the .entitlements file to include the -systemextension suffix, the project fails to build because Xcode does not recognize the modi
Replies
3
Boosts
0
Views
599
Activity
Jun ’25
Reply to jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
[quote='790330021, pbierre, /thread/790330, /profile/pbierre'] The error feedback from codesign is nonspecific and inactionable. [/quote] Looking at the log you posted I don’t actually see any error information from codesign. It seems that your tooling runs codesign which then exits with status 1, and that’s it. Normally when codesign fails it prints something to stderr. Is that not the case here? Or did it print something but it’s not in the log you included? ps My best guess, based on the info you included, is that this error will be something like this: % codesign -s …all your other arguments elided… libnet.dylib libnet.dylib: is already signed That’s due to a subtle difference between Intel and Apple silicon. On Apple silicon all code is signed by default. If you using an open source toolchain to build your code then it gets ad-hoc signed by the linker. That means that, when you go to sign it, the signing fails because it’s already signed, and hence this error.
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
Jun ’25
Reply to Network extension authorization dialog not appearing
I am still digesting that, but I was about to upload another sysdiagnose -- this one from a githubs action VM that demonstrated the same behaviour (but which was a clean install of our app). There was a sysdiagnose from macOS 13.7.6 uploaded which I did look over. Unfortunately, that appears to be a different issue, as sysextd is actually crashing before before it starts authorizing. This does appear to be a known issue (r.99777199), however, there haven't been really been reports post-macOS 13. If you're seeing this crash on more recent releases then that's worth further investigations/bugs, but I don't think there's a lot to be done on macOS 13. Each build gets a new number; for annoying reasons, the build is done twice (Apple Silicon and Intel), lipo'd together, and then codesigned again. For what it's worth, I don't actually have any problem with incrementing all component versions, even when a give component doesn't change. Given the possible complexity of component interactions, it's entirely p
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Network extension authorization dialog not appearing
I am still digesting that, but I was about to upload another sysdiagnose -- this one from a githubs action VM that demonstrated the same behaviour (but which was a clean install of our app). But I think I'll try to fix some of the obvious-fixable issues there. We don't have UF_IMMUTABLE set on anything, and the one process in the suite that uses ESF doesn't protect anything in /Library/SystemExtensions. That process needs the TCC, but without MDM, it requires manual intervention by the user. I don't think it does it on the github actions tests. Each build gets a new number; for annoying reasons, the build is done twice (Apple Silicon and Intel), lipo'd together, and then codesigned again. The crashes you note are either segfaults or reference count crashes, and should not happen -- it seems to be an issue with XPC. The code in question is written in ObjC.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’25