Search results for

“codesign”

3,223 results found

Post

Replies

Boosts

Views

Activity

Help with Entitlements for Keychain Access
Hi everyone, I’m working an Objective-C lib that performs Keychain operations, such as generating cryptographic keys and signing data. The lib will be used by my team in a Java program for macOS via JNI. When working with the traditional file-based Keychain (i.e., without access control flags), everything works smoothly, no issues at all. However, as soon as I try to generate a key using access control flags SecAccessControlCreateWithFlags, the Data Protection Keychain returns error -34018 (errSecMissingEntitlement) during SecKeyCreateRandomKey. This behavior is expected. To address this, I attempted to codesign my native dynamic library (.dylib) with an entitlement plist specifying various combinations of: keychain-access-groups com.apple.security.keychain etc. with: My Apple Development certificate Developer ID Application certificate Apple Distribution certificate None of these combinations made a difference, the error persists. I’d love to clarify: Is it supported to access Data Protection Keycha
1
0
421
Jul ’25
Encounter "zsh: trace trap" after updating trust settings for Apple certificates
Hi guys, New to publishing apps on Apple Store. I encounter some notarization error before and resolved it in this post. By solving the previous issue, I updated the Trust setting from Always Trust to Use System Defaults for Apple certificates. The codesign and notarization no longer give me any problem. But now, I encountered another issue. When I ran the .app on my local Macbook, it now gives me zsh: trace trap error. Dive a little further and check the crash report, I found the some details as following. Process: my_app [30652] Path: /Users/USER/my_app_path Identifier: my_app Version: 0.0.0 (???) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2025-07-15 14:57:58.9874 -0400 OS Version: macOS 15.5 (24F74) Report Version: 12 Anonymous UUID: 2335F0B6-A26E-6446-6074-0FCE620C4B6A Time Awake Since Boot: 6000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
5
0
304
Jul ’25
Missing entitlement com.apple.developer.system-extension.install
Hi I am building obs studio using cmake and Xcode. I used cmake --preset macos -DOBS_CODESIGN_IDENTITY= to generate the build folder and inside X code used Provisioning Profile with Developer ID Application certification. The build was generated successfully but when I tried to turn on the virtual camera I see missing Missing entitlement com.apple.developer.system-extension.install error. (My Provisioning profile has System Extension Capability checked on apple developer portal) If I use this flow instead: cmake --preset macos -DOBS_CODESIGN_TEAM=63B5A5WDNG Build using Xcode with Automatic manage signing with Apple Developer Certificate. Obs studio builds successfully and Virtual camera extension also works fine. My primary goal is to notarise my app which contains OBS studio and Blackhole Audio driver for distribution outside app store. If I try to sign my obs app generated in second step codesign --deep --force --timestamp --verify --verbose --options runtime --sign Developer ID Application:*** OB
1
0
448
Jul ’25
Reply to Missing entitlement com.apple.developer.system-extension.install
[quote='793731021, VarunC, /thread/793731, /profile/VarunC'] If I try to sign my obs app generated in second step codesign --deep [/quote] Don’t use --deep when signing code. See --deep Considered Harmful for an explanation as to why that’s bad. I can’t really help you with third-party tools like CMake. However, we have solid documentation that explains how to sign and package Mac code outstide of Xcode, namely: Creating distribution-signed code for macOS Packaging Mac software for distribution I recommend that you read that, apply the steps manually, verify that things are working, and then research how to integrate equivalent steps into yoru third-party tools. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: Entitlements Tags:
Jul ’25
Reply to Keychain Access won't let me Export to a .p12 file
The recipe to transfer the Developer ID Certs --> MyCertificates isn't perfect....it did allow me to copy the Certs into login / MyCertificates, but if I then try to delete the Developer ID Certs associated with System / Certificates, the delete command deletes BOTH copies of the Cert, leaving me with nothing. The good news is that codesign accepts the Certs I transferred by .p12 file Export / Import onto my M2 computer (which was the higher-level problem). It only gives a warning about finding multiple copies of the same cert. I chose NOT to accept the answer because it leaves the codesign with this warning.
Jul ’25
Reply to Encounter "zsh: trace trap" after updating trust settings for Apple certificates
Hi Quinn, Thanks for the information! I tried the link you mentioned, but no luck so far. I tried the following so far: Add com.apple.security.cs.allow-unsigned-executable-memory to the entitlements.plist file. Normalise the Entitlements Property List Re-codesign the .app folder. Notarize and staple the .app folder I tried syspolicy_check distribution my_app.app and got the following App passed all pre-distribution checks and is ready for distribution. But when I try to run the app from the terminal, I still got zsh: trace trap ./path_to_my_app error. When I tried to launch the app by double clicking the .app file, it would exist immediately without launching it.
Topic: Code Signing SubTopic: General Tags:
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
Jul ’25
Reply to DriverKit issue with TestFlight
Below are the Info.plist, entitlements, and App Store profiles for our driver and client app. So, as a quick side comment, when looking into an issue like this, it's critical to look at the actual Info.plist file, not just the Xcode project settings. I happened to have been sent your DEXT by one of our evangelists, but without the actual data, I probably wouldn't have thought of this. In any case, here is the CFBundleVersion of your development DEXT: CFBundleVersion = 1 And here is your TestFlight version: CFBundleVersion = 3433099.287482533 You can read the full details here, but that second version simply will not work in a DEXT/KEXT. I suspect that's the problem here, but covering a few odds and ends: Our driver’s Info.plist specifies both idVendor and idProduct, but our entitlements and provisioning profiles currently include only the idVendor. Do we need to request approval or entitlement inclusion for the idProduct as well? No. There are actually two mechanisms at work here that operate independently. Y
Topic: App & System Services SubTopic: Drivers Tags:
Jul ’25
Reply to Keychain Access won't let me Export to a .p12 file
When I initially obtained my Developer ID Application and Developer ID Installer Certificates, they were put in the Certificates under the System Keychain. I don't remember choosing this storage location. The associated private keys were stored in Keys / login. And since codesign was happy with finding my credentials stored this way, but you're saying to Export them they needed to go in MyCertificates, this raises the 2 questions: How do I move my Developer ID Certificates into MyCertificates? How was it decided to install them in the wrong place?
Jul ’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
Jul ’25
Reply to jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
I’m glad you got this sorted. I can’t help you with jpackage, but the general suggestions in Creating distribution-signed code for macOS still apply: Use security find-identity to locate the correct code signing identity. See the doc for the exact command. Note down the SHA-1 hash of that identity. When you go to sign code, pass that SHA-1 hash to codesign. That uniquely identifies the identity, so there’s no ambiguity. I’m not sure if jpackage supports this SHA-1 mechanism but, if not, I encourage you to file an enhancement request against it for that support. It really helps with automated workflows like this. Indeed, if you look at how Xcode invokes codesign [1], you’ll see it that it uses the SHA-1 hash exclusively. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] I have an example of that in Command [something] failed with a nonzero exit code.
Topic: Code Signing SubTopic: General
Jul ’25
Reply to Command CodeSign failed with a nonzero exit code - OpenGL
When you get an error like this, codesign usually outputs something helpful to the build report. I explain how to get at that in Command [something] failed with a nonzero exit code. What are you seeing? Sign to Run Locally should be fine in this context, but I generally recommend that you use Apple Development signing. You don’t have to pay to join the Apple Developer Program to use that. Rather, use your existing Apple Account to log in to Xcode > Settings > Accounts and Xcode will set up a Personal Team. IMPORTANT The Personal Team feature has significant limitations. For the details, see Developer > Support > Choosing a Membership. However, those limits are primarily relevant to iOS. Mac developers generally don’t even notice (-: Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: General
Jul ’25
Command CodeSign failed with a nonzero exit code - OpenGL
Hey, So i am trying to setup OpenGL on my mac. Specs : M2 Pro, 15.5 (24F74) Now i have setup the entire project properly as far as i know. GLFW, GLAD and the OpenGL framework. the build libraries are also reference and everything. I have also included the glad.c file in the folder. i have also kept it to run locally in signing tab. its still giving me Command CodeSign failed with a nonzero exit code All the ss are provided
Topic: Code Signing SubTopic: General
1
0
489
Jul ’25
Notarization accepted, but the staple and validate action failed! Error 65.
Hi guys, I am new to publishing apps on Apple Store. I used python, pyside6, torch, pyinstaller to build an app for Apple Store. For codesigning, I used the correct Developer ID Application to sign the code. When I validate the .app file (codesign -vv --strict ), I got the following my_app.app: valid on disk my_app.app: satisfies its Designated Requirement Next, I used ditto to ditto -c -k --sequesterRsrc --keepParent my_app.app my_app.zip to zip it. Then, I submitted this my_app.zip file for notarization with xcrun notarytool submit ... and got the following accepted message. Received new status: Accepted Current status: Accepted............... [20:08:54.530Z] Info [API] Submission in terminal status: Accepted Processing complete After that, I want to staple it with xcrun stapler staple my_app.app, but I got the following Could not validate ticket for my_app.app The staple and validate action failed! Error 65. To further investigate it, I ran spctl -a -vvv my_app.app and got my_app.app: rej
1
0
365
Jul ’25
Help with Entitlements for Keychain Access
Hi everyone, I’m working an Objective-C lib that performs Keychain operations, such as generating cryptographic keys and signing data. The lib will be used by my team in a Java program for macOS via JNI. When working with the traditional file-based Keychain (i.e., without access control flags), everything works smoothly, no issues at all. However, as soon as I try to generate a key using access control flags SecAccessControlCreateWithFlags, the Data Protection Keychain returns error -34018 (errSecMissingEntitlement) during SecKeyCreateRandomKey. This behavior is expected. To address this, I attempted to codesign my native dynamic library (.dylib) with an entitlement plist specifying various combinations of: keychain-access-groups com.apple.security.keychain etc. with: My Apple Development certificate Developer ID Application certificate Apple Distribution certificate None of these combinations made a difference, the error persists. I’d love to clarify: Is it supported to access Data Protection Keycha
Replies
1
Boosts
0
Views
421
Activity
Jul ’25
Encounter "zsh: trace trap" after updating trust settings for Apple certificates
Hi guys, New to publishing apps on Apple Store. I encounter some notarization error before and resolved it in this post. By solving the previous issue, I updated the Trust setting from Always Trust to Use System Defaults for Apple certificates. The codesign and notarization no longer give me any problem. But now, I encountered another issue. When I ran the .app on my local Macbook, it now gives me zsh: trace trap error. Dive a little further and check the crash report, I found the some details as following. Process: my_app [30652] Path: /Users/USER/my_app_path Identifier: my_app Version: 0.0.0 (???) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2025-07-15 14:57:58.9874 -0400 OS Version: macOS 15.5 (24F74) Report Version: 12 Anonymous UUID: 2335F0B6-A26E-6446-6074-0FCE620C4B6A Time Awake Since Boot: 6000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Replies
5
Boosts
0
Views
304
Activity
Jul ’25
Missing entitlement com.apple.developer.system-extension.install
Hi I am building obs studio using cmake and Xcode. I used cmake --preset macos -DOBS_CODESIGN_IDENTITY= to generate the build folder and inside X code used Provisioning Profile with Developer ID Application certification. The build was generated successfully but when I tried to turn on the virtual camera I see missing Missing entitlement com.apple.developer.system-extension.install error. (My Provisioning profile has System Extension Capability checked on apple developer portal) If I use this flow instead: cmake --preset macos -DOBS_CODESIGN_TEAM=63B5A5WDNG Build using Xcode with Automatic manage signing with Apple Developer Certificate. Obs studio builds successfully and Virtual camera extension also works fine. My primary goal is to notarise my app which contains OBS studio and Blackhole Audio driver for distribution outside app store. If I try to sign my obs app generated in second step codesign --deep --force --timestamp --verify --verbose --options runtime --sign Developer ID Application:*** OB
Replies
1
Boosts
0
Views
448
Activity
Jul ’25
Reply to Missing entitlement com.apple.developer.system-extension.install
[quote='793731021, VarunC, /thread/793731, /profile/VarunC'] If I try to sign my obs app generated in second step codesign --deep [/quote] Don’t use --deep when signing code. See --deep Considered Harmful for an explanation as to why that’s bad. I can’t really help you with third-party tools like CMake. However, we have solid documentation that explains how to sign and package Mac code outstide of Xcode, namely: Creating distribution-signed code for macOS Packaging Mac software for distribution I recommend that you read that, apply the steps manually, verify that things are working, and then research how to integrate equivalent steps into yoru third-party tools. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Keychain Access won't let me Export to a .p12 file
The recipe to transfer the Developer ID Certs --> MyCertificates isn't perfect....it did allow me to copy the Certs into login / MyCertificates, but if I then try to delete the Developer ID Certs associated with System / Certificates, the delete command deletes BOTH copies of the Cert, leaving me with nothing. The good news is that codesign accepts the Certs I transferred by .p12 file Export / Import onto my M2 computer (which was the higher-level problem). It only gives a warning about finding multiple copies of the same cert. I chose NOT to accept the answer because it leaves the codesign with this warning.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Encounter "zsh: trace trap" after updating trust settings for Apple certificates
Hi Quinn, Thanks for the information! I tried the link you mentioned, but no luck so far. I tried the following so far: Add com.apple.security.cs.allow-unsigned-executable-memory to the entitlements.plist file. Normalise the Entitlements Property List Re-codesign the .app folder. Notarize and staple the .app folder I tried syspolicy_check distribution my_app.app and got the following App passed all pre-distribution checks and is ready for distribution. But when I try to run the app from the terminal, I still got zsh: trace trap ./path_to_my_app error. When I tried to launch the app by double clicking the .app file, it would exist immediately without launching it.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
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
Jul ’25
Reply to DriverKit issue with TestFlight
Below are the Info.plist, entitlements, and App Store profiles for our driver and client app. So, as a quick side comment, when looking into an issue like this, it's critical to look at the actual Info.plist file, not just the Xcode project settings. I happened to have been sent your DEXT by one of our evangelists, but without the actual data, I probably wouldn't have thought of this. In any case, here is the CFBundleVersion of your development DEXT: CFBundleVersion = 1 And here is your TestFlight version: CFBundleVersion = 3433099.287482533 You can read the full details here, but that second version simply will not work in a DEXT/KEXT. I suspect that's the problem here, but covering a few odds and ends: Our driver’s Info.plist specifies both idVendor and idProduct, but our entitlements and provisioning profiles currently include only the idVendor. Do we need to request approval or entitlement inclusion for the idProduct as well? No. There are actually two mechanisms at work here that operate independently. Y
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Keychain Access won't let me Export to a .p12 file
When I initially obtained my Developer ID Application and Developer ID Installer Certificates, they were put in the Certificates under the System Keychain. I don't remember choosing this storage location. The associated private keys were stored in Keys / login. And since codesign was happy with finding my credentials stored this way, but you're saying to Export them they needed to go in MyCertificates, this raises the 2 questions: How do I move my Developer ID Certificates into MyCertificates? How was it decided to install them in the wrong place?
Replies
Boosts
Views
Activity
Jul ’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
Jul ’25
Reply to jpackage bombing on codesign/libnet.dylib (but only on M2 MacBook)
I’m glad you got this sorted. I can’t help you with jpackage, but the general suggestions in Creating distribution-signed code for macOS still apply: Use security find-identity to locate the correct code signing identity. See the doc for the exact command. Note down the SHA-1 hash of that identity. When you go to sign code, pass that SHA-1 hash to codesign. That uniquely identifies the identity, so there’s no ambiguity. I’m not sure if jpackage supports this SHA-1 mechanism but, if not, I encourage you to file an enhancement request against it for that support. It really helps with automated workflows like this. Indeed, if you look at how Xcode invokes codesign [1], you’ll see it that it uses the SHA-1 hash exclusively. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] I have an example of that in Command [something] failed with a nonzero exit code.
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
Jul ’25
Reply to Moving signing to a new machine
It looks like you started a couple of new threads for these issues: Keychain Access won't let me Export to a .p12 file Codesign --force not signing 3rd Pty binaries Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Jul ’25
Reply to Command CodeSign failed with a nonzero exit code - OpenGL
When you get an error like this, codesign usually outputs something helpful to the build report. I explain how to get at that in Command [something] failed with a nonzero exit code. What are you seeing? Sign to Run Locally should be fine in this context, but I generally recommend that you use Apple Development signing. You don’t have to pay to join the Apple Developer Program to use that. Rather, use your existing Apple Account to log in to Xcode > Settings > Accounts and Xcode will set up a Personal Team. IMPORTANT The Personal Team feature has significant limitations. For the details, see Developer > Support > Choosing a Membership. However, those limits are primarily relevant to iOS. Mac developers generally don’t even notice (-: Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
Jul ’25
Command CodeSign failed with a nonzero exit code - OpenGL
Hey, So i am trying to setup OpenGL on my mac. Specs : M2 Pro, 15.5 (24F74) Now i have setup the entire project properly as far as i know. GLFW, GLAD and the OpenGL framework. the build libraries are also reference and everything. I have also included the glad.c file in the folder. i have also kept it to run locally in signing tab. its still giving me Command CodeSign failed with a nonzero exit code All the ss are provided
Topic: Code Signing SubTopic: General
Replies
1
Boosts
0
Views
489
Activity
Jul ’25
Notarization accepted, but the staple and validate action failed! Error 65.
Hi guys, I am new to publishing apps on Apple Store. I used python, pyside6, torch, pyinstaller to build an app for Apple Store. For codesigning, I used the correct Developer ID Application to sign the code. When I validate the .app file (codesign -vv --strict ), I got the following my_app.app: valid on disk my_app.app: satisfies its Designated Requirement Next, I used ditto to ditto -c -k --sequesterRsrc --keepParent my_app.app my_app.zip to zip it. Then, I submitted this my_app.zip file for notarization with xcrun notarytool submit ... and got the following accepted message. Received new status: Accepted Current status: Accepted............... [20:08:54.530Z] Info [API] Submission in terminal status: Accepted Processing complete After that, I want to staple it with xcrun stapler staple my_app.app, but I got the following Could not validate ticket for my_app.app The staple and validate action failed! Error 65. To further investigate it, I ran spctl -a -vvv my_app.app and got my_app.app: rej
Replies
1
Boosts
0
Views
365
Activity
Jul ’25