Search results for

“codesign”

3,223 results found

Post

Replies

Boosts

Views

Activity

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
Codesign can't find keychain files (on M2 MacBook)
I've been distributing my Math Education app (Java-based) as a downloadable .dmg. My sw manufacturing process was working well on my Intel-iMac a year ago (signing, notarization, stapling). I need to support Apple Silicon, so I replicated the SW manuf. stack on my M2 MacBook, including putting my Developer and Installer Certificates in the Keychain Access. I get through building the M2,M2,M4 .dmg installer file just fine. But the Codesign is failing. It should be prompting me for my MacOS password (it does this in the Intel-Mac process), but fails this command: 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. The signer reference is correct, and works fine on the Intel-Mac codesign process. What could explain why the same script fails in the M2 environment? Does codesign normally prompt for
4
0
289
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
Using Processor Trace on Non-Xcode Built Binary
Hiya folks! I'm David and I work on rust-analyzer, which is a language server for Rust similar to sourcekit-lsp. I'm using the new Instruments profiling tooling functionality in Xcode 16.3 and Xcode 26 (Processor Trace and CPU Counters) to profile our trait solver/type checker. While I've been able to use the new CPU Counters instrument successfully (the CPU Bottleneck feature is incredible! Props to the team!), I've been unable to make use of the Processor Trace instrument. Instruments gives me the error message Processor Trace cannot profile this process without proper permissions. The diagnostic suggests adding the com.apple.security-get-task-allow entitlement to the code I'm trying to profile, or ensure that the build setting CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES is enabled in Xcode. Unfortunately, I don't know how I can add that entitlement to a self-signed binary produced by Cargo and I'm not using Xcode for somewhat obvious reasons. Here's some information about my setup: Instruments Version 26.0 (1
8
0
1.1k
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
Failed to notarize a "distribution" pkg
I'm building a custom macOS installer for my software, primarily using the builtin tools of codesign, pkgbuild, productbuild and xcrun. My product consist of a list of plugins and a CEP extension for the Adobe After Effect app. All of my bundles and binaries are properly signed using a trusted Apple Developer certificate I've generated, of type Developer ID Application. My installer is a distribution pkg, and has this structure(expanding it using pkgutil --expand): SceneTools-3.4.4-osx-installer ├── Distribution ├── miscellaneous.pkg ├── plugins.aftereffects2022.pkg ├── plugins.aftereffects2023.pkg ├── plugins.aftereffects2024.pkg ├── plugins.aftereffects2025.pkg ├── preinstall.pkg ├── Resources ├── scenebuilder.pkg └── uninstaller.pkg Each child pkg would install parts of my product in different locations in the target macOS disk(this is why I'm using that kind of style of building the custom installer). Signing each and every bundle or binary of my product, signing the child pkg's, then notarizing
5
0
333
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
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
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
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
jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
This is a Math+CS Educational app written in Java. I have been able to distribute the Intel-Mac version downloaded as a .dmg (code-signed, notarized and stapled). I also need to support Apple silicon hw. I re-created the entire sw manufacturing structure on my M2 Macbook. I'm using the exact same command scripts that work on the older hardware. I am expecting the jpackage script to run the same way on the M2....but no. The first sign of trouble is I'm not getting an authentication password dialog , which I believe is thrown up by the MacOS when codesign asks to access my Keychain certificates. My keychain is setup the default way. Here is the error msg: [07:38:08.719] Running /usr/bin/codesign [07:38:08.749] 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.jpackage11705714069544945060/images/image-2753484488940
Topic: Code Signing SubTopic: General
5
0
143
Jun ’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
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
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
Codesign can't find keychain files (on M2 MacBook)
I've been distributing my Math Education app (Java-based) as a downloadable .dmg. My sw manufacturing process was working well on my Intel-iMac a year ago (signing, notarization, stapling). I need to support Apple Silicon, so I replicated the SW manuf. stack on my M2 MacBook, including putting my Developer and Installer Certificates in the Keychain Access. I get through building the M2,M2,M4 .dmg installer file just fine. But the Codesign is failing. It should be prompting me for my MacOS password (it does this in the Intel-Mac process), but fails this command: 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. The signer reference is correct, and works fine on the Intel-Mac codesign process. What could explain why the same script fails in the M2 environment? Does codesign normally prompt for
Replies
4
Boosts
0
Views
289
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
Using Processor Trace on Non-Xcode Built Binary
Hiya folks! I'm David and I work on rust-analyzer, which is a language server for Rust similar to sourcekit-lsp. I'm using the new Instruments profiling tooling functionality in Xcode 16.3 and Xcode 26 (Processor Trace and CPU Counters) to profile our trait solver/type checker. While I've been able to use the new CPU Counters instrument successfully (the CPU Bottleneck feature is incredible! Props to the team!), I've been unable to make use of the Processor Trace instrument. Instruments gives me the error message Processor Trace cannot profile this process without proper permissions. The diagnostic suggests adding the com.apple.security-get-task-allow entitlement to the code I'm trying to profile, or ensure that the build setting CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES is enabled in Xcode. Unfortunately, I don't know how I can add that entitlement to a self-signed binary produced by Cargo and I'm not using Xcode for somewhat obvious reasons. Here's some information about my setup: Instruments Version 26.0 (1
Replies
8
Boosts
0
Views
1.1k
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
Failed to notarize a "distribution" pkg
I'm building a custom macOS installer for my software, primarily using the builtin tools of codesign, pkgbuild, productbuild and xcrun. My product consist of a list of plugins and a CEP extension for the Adobe After Effect app. All of my bundles and binaries are properly signed using a trusted Apple Developer certificate I've generated, of type Developer ID Application. My installer is a distribution pkg, and has this structure(expanding it using pkgutil --expand): SceneTools-3.4.4-osx-installer ├── Distribution ├── miscellaneous.pkg ├── plugins.aftereffects2022.pkg ├── plugins.aftereffects2023.pkg ├── plugins.aftereffects2024.pkg ├── plugins.aftereffects2025.pkg ├── preinstall.pkg ├── Resources ├── scenebuilder.pkg └── uninstaller.pkg Each child pkg would install parts of my product in different locations in the target macOS disk(this is why I'm using that kind of style of building the custom installer). Signing each and every bundle or binary of my product, signing the child pkg's, then notarizing
Replies
5
Boosts
0
Views
333
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
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
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
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
jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
This is a Math+CS Educational app written in Java. I have been able to distribute the Intel-Mac version downloaded as a .dmg (code-signed, notarized and stapled). I also need to support Apple silicon hw. I re-created the entire sw manufacturing structure on my M2 Macbook. I'm using the exact same command scripts that work on the older hardware. I am expecting the jpackage script to run the same way on the M2....but no. The first sign of trouble is I'm not getting an authentication password dialog , which I believe is thrown up by the MacOS when codesign asks to access my Keychain certificates. My keychain is setup the default way. Here is the error msg: [07:38:08.719] Running /usr/bin/codesign [07:38:08.749] 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.jpackage11705714069544945060/images/image-2753484488940
Topic: Code Signing SubTopic: General
Replies
5
Boosts
0
Views
143
Activity
Jun ’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
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