Search results for

“codesign”

3,222 results found

Post

Replies

Boosts

Views

Activity

Reply to SMAppService Sample Code seems broken
And just to verify that it is in fact signed (team ID partially redacted): % codesign -dv /Applications/SMAppServiceSampleCode.app/Contents/Resources/SampleLaunchAgent Executable=/Applications/SMAppServiceSampleCode.app/Contents/Resources/SampleLaunchAgent Identifier=SampleLaunchAgent Format=Mach-O thin (arm64) CodeDirectory v=20400 size=853 flags=0x0(none) hashes=16+7 location=embedded Signature size=4786 Signed Time=Sep 12, 2025 at 2:22:55 PM Info.plist=not bound TeamIdentifier=******9437 Sealed Resources=none Internal requirements count=1 size=188
Sep ’25
Reply to App Groups names are red
It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits. I am using macOS style that starts with Team ID OK. The Xcode App Group editor is not fully up to speed when it comes to macOS-style app group IDs. The screen shot of your provisioning profile shows the it’s correctly authorising you to use any group matching 2V________.*. And the App Groups editor is showing that you claim two of those groups. That’s all good. Note Regarding the group.com._.MySecurtiyAppGroup, it’s presence isn’t a problem. You’re not claiming access to that group, because the checkbox next it in the App Groups editor isn’t checked. And it’s fine for the profile to authorise you to use groups that you don’t then claim. I suspect that the red indicates that the app group ID you’re claiming isn’t literally in the app group ID listed in the profile. With iOS-style app groups ID that’d be a serious problem. With macOS-style app group IDs, that’s fine because of the wildcar
Sep ’25
Reply to macOS 26 Launch Constraints
When building as described above, the helper crashes in such a way (Termination Reason: CODESIGNING 4 Launch Constraint Violation) that suggests I need to apply launch constraints to resolve the problem. I had not previously had launch constraints in my project.
Topic: Code Signing SubTopic: General Tags:
Sep ’25
Reply to macOS 26 Launch Constraints
I should add, that using codesign -d -vvvv to interrogate my helper, it doesn't appear that the parent process plist (.coderequirement) is getting embedded in my command-line helper tool. The info.plist IS getting embedded, however.
Topic: Code Signing SubTopic: General Tags:
Sep ’25
macOS 26 Launch Constraints
I've recently upgraded to the RC candidates of macOS 26 and Xcode 26. The app I'm building has a helper tool using SMAppService. When I run the app and helper tool in macOS 15 or macOS 26, all works as expected. When it runs on macOS 13 or 14, which previously worked. The helper now crashes on launch with the following reason: Termination Reason: CODESIGNING 4 Launch Constraint Violation I found this developer session which seems to address this, but the plist I've added doesn't seem to satisfy the constraint. https://developer.apple.com/videos/play/wwdc2023/10266/ Here are the contents of my new plist: Are there any gotchas here that I might be missing? Thanks!
12
0
1.4k
Sep ’25
Reply to disable-library-validation entitlement makes app unlaunchable
TN3125 is correct in saying that the hardened runtime entitlements are unrestricted, that is, their used doesn’t have to be authorisation by a profile. I’m not sure what’s going with your app but this is working for me: Using Xcode 16.4 on macOS 15.6.1, create a new project from the macOS > Command Line Tool target. In Signing & Capabilities > Hardened Runtime, check the Disable Library Validation box. Build and run; the program runs just fine. Dump the entitlements of the built executable: % codesign -d -vvv --entitlements - Test799497 … CodeDirectory v=20500 size=630 flags=0x10000(runtime) … … [Dict] [Key] com.apple.security.cs.disable-library-validation [Value] [Bool] true … The runtime flag indicates that the hardened runtime is enabled, and the com.apple.security.cs.disable-library-validation entitlement disables library validation. Moreover, this is a command-line tool, and thus it has no provisioning profile. Please repeat the above, just to make sure that we’re on the same page. As
Topic: Code Signing SubTopic: Entitlements Tags:
Sep ’25
Reply to Best practices for post-build codesigning
My understanding is that Xcode Cloud uses cloud signing [1]. Assuming that, the result you’re seeing make sense. With cloud signing the signing identity is never present in the keychain. Hence the whole “cloud” thing (-: Cloud signing is only supported in Xcode (and xcodebuild). It’s not directly supported by codesign [2]. So, you won’t be able to use it to sign your disk image. That leaves you with a few options: Don’t use a disk image. If it’s just a normal app, distributing it as a zip archive is a reasonable option. Don’t sign your disk image. While I generally recommend that folks sign their disk images, it’s not an absolute requirement. Pass your normal (so, not managed) Developer ID Application signing identity to Xcode Cloud and use that to sign your disk image. I’ll admit that none of these are particularly appealing, and I think it’d make sense for you to file an enhancement request against Xcode Cloud for a better way to deal with this. Please post your bug number, just for the record. Sha
Sep ’25
3rd-party closed-source XCFramework security
Hey! I am developing a macOS application with the help of an external vendor, who is supplying me with a closed-source XCFramework. In Xcode, when I import their XCFramework bundle, when running the app, or opening a SwiftUI preview, or interacting with the app in any form, I get the familiar dialog: [SDK name].framework Not Opened - Apple could not verify [SDK name].framework is free from malware that may harm your Mac or compromise privacy. (Regardless, the application can run on my machine.) But indeed, their cross-platform iOS/macOS XCFramework is not notarized at all (using spctl -a -t install), plus the macOS binary embedded is not code signed correctly (using codesign -d). The XCFramework itself is production code signed with a Developer ID certificate, however I believed the above issues to be valid. Now, I asked the vendor to provide a correctly distributed (so code signed and notarized) framework, however they pointed out that when I embed and sign the product in my app, it will be re-signe
3
0
197
Sep ’25
Helper app is sandboxed (entitlement + runtime check), but `URLsForDirectory:` returns user home (`/Users//`) instead of container path — why?
Problem summary I have a macOS helper app that is launched from a sandboxed main app. The helper: has com.apple.security.app-sandbox = true and com.apple.security.inherit = true in its entitlements, is signed and embedded inside the main app bundle (placed next to the main executable in Contents/MacOS), reports entitlement_check = 1 (code signature contains sandbox entitlement, implemented via SecStaticCode… check), sandbox_check(getpid(), NULL, 0) returns 1 (runtime sandbox enforcement present), APP_SANDBOX_CONTAINER_ID environment variable is not present (0). Despite that, Cocoa APIs return non-container home paths: NSHomeDirectory() returns /Users/<me>/ (the real home). [[NSFileManager defaultManager] URLsForDirectory:inDomains:] and URLForDirectory:inDomain:appropriateForURL:create:error: return paths rooted at /Users/<me>/ (not under ~/Library/Containers/<app_id>/Data/...) — i.e. they look like non-sandboxed locations. However, one important exception: URLForDirectory:... for NSItemRepl
7
0
227
Sep ’25
Mac: Best way to distinguish native app process and script process spawned from executable (e.g. python node) through process_id
I'm working on a Mac app that receives a process ID via NSXPCConnection, and I'm trying to figure out the best way to determine whether that process is a native macOS app like Safari—with bundles and all—or just a script launched by something like Node or Python. The executable is signed with a Team ID using codesign. I was thinking about getting the executable's path as one way to handle it, but I’m wondering if there’s a more reliable method than relying on the folder structure.
1
0
240
Sep ’25
codesign Failure with errSecInternalComponent Error
I am experiencing a persistent issue when trying to sign my application, PhotoKiosk.app, using codesign. The process consistently fails with the error errSecInternalComponent, and my troubleshooting indicates the problem is with how the system accesses or validates my certificate's trust chain, rather than the certificate itself. Error Details and Configuration: codesign command executed: codesign --force --verbose --options=runtime --entitlements /Users/sergiomordente/Documents/ProjetosPhotocolor/PhotoKiosk-4M/entitlements.plist --sign Developer ID Application: Sérgio Mordente (G75SJ6S9NC) /Users/sergiomordente/Documents/ProjetosPhotocolor/PhotoKiosk-4M/dist/PhotoKiosk.app Error message received: Warning: unable to build chain to self-signed root for signer (null) /Users/sergiomordente/Documents/ProjetosPhotocolor/PhotoKiosk-4M/dist/PhotoKiosk.app: errSecInternalComponent Diagnostic Tests and Verifications Performed: Code Signing Identity Validation: I ran the command security find
1
0
912
Sep ’25
Reply to Best practices for post-build codesigning
Hi. Yes, the Developer ID identity. Thanks for promoting the use of proper terminology 😁 I've read through a number of your other posts on this forum and found them informative and helpful. And yes, I'm referring to Xcode Cloud. My ci_post_xcodebuild.sh script includes: codesign ... --sign $CODESIGN_IDENTITY diskimage.dmg Where CODESIGN_IDENTITY is the SHA-1 of my Developer ID Application: My Company (MYTEAMID). It unsurprisingly fails with: error: The specified item could not be found in the keychain. I can also see there are no identities in the keychain with: security find-identity -v -p codesigning I'm hoping Xcode Cloud provides me a better way to access the identity than uploading the .p12 to the host... Thanks!
Sep ’25
Best practices for post-build codesigning
My post-build script takes the developeridexport archive export, zips it up and uses notarytool to notarize it. I then add the .zip to a .dmg disk image. The next step is to codesign the disk image before notarizing that too. The issue is my Developer ID Application certificate is not accessible to the build host. (When I was doing this in Microsoft AppCenter (now defunct), it had a copy of my Developer ID Application certificate.) What steps do I need to take to get the disk image signed for notarization? Thanks! Lance
6
0
415
Sep ’25
Reply to SMAppService Sample Code seems broken
And just to verify that it is in fact signed (team ID partially redacted): % codesign -dv /Applications/SMAppServiceSampleCode.app/Contents/Resources/SampleLaunchAgent Executable=/Applications/SMAppServiceSampleCode.app/Contents/Resources/SampleLaunchAgent Identifier=SampleLaunchAgent Format=Mach-O thin (arm64) CodeDirectory v=20400 size=853 flags=0x0(none) hashes=16+7 location=embedded Signature size=4786 Signed Time=Sep 12, 2025 at 2:22:55 PM Info.plist=not bound TeamIdentifier=******9437 Sealed Resources=none Internal requirements count=1 size=188
Replies
Boosts
Views
Activity
Sep ’25
Reply to App Groups names are red
It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits. I am using macOS style that starts with Team ID OK. The Xcode App Group editor is not fully up to speed when it comes to macOS-style app group IDs. The screen shot of your provisioning profile shows the it’s correctly authorising you to use any group matching 2V________.*. And the App Groups editor is showing that you claim two of those groups. That’s all good. Note Regarding the group.com._.MySecurtiyAppGroup, it’s presence isn’t a problem. You’re not claiming access to that group, because the checkbox next it in the App Groups editor isn’t checked. And it’s fine for the profile to authorise you to use groups that you don’t then claim. I suspect that the red indicates that the app group ID you’re claiming isn’t literally in the app group ID listed in the profile. With iOS-style app groups ID that’d be a serious problem. With macOS-style app group IDs, that’s fine because of the wildcar
Replies
Boosts
Views
Activity
Sep ’25
Reply to macOS 26 Launch Constraints
When building as described above, the helper crashes in such a way (Termination Reason: CODESIGNING 4 Launch Constraint Violation) that suggests I need to apply launch constraints to resolve the problem. I had not previously had launch constraints in my project.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Can I Exporting a Developer ID PacketTunnelProvider Plugin?
This is my extension's entitlements which dump by codesign
Replies
Boosts
Views
Activity
Sep ’25
Reply to macOS 26 Launch Constraints
I should add, that using codesign -d -vvvv to interrogate my helper, it doesn't appear that the parent process plist (.coderequirement) is getting embedded in my command-line helper tool. The info.plist IS getting embedded, however.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
macOS 26 Launch Constraints
I've recently upgraded to the RC candidates of macOS 26 and Xcode 26. The app I'm building has a helper tool using SMAppService. When I run the app and helper tool in macOS 15 or macOS 26, all works as expected. When it runs on macOS 13 or 14, which previously worked. The helper now crashes on launch with the following reason: Termination Reason: CODESIGNING 4 Launch Constraint Violation I found this developer session which seems to address this, but the plist I've added doesn't seem to satisfy the constraint. https://developer.apple.com/videos/play/wwdc2023/10266/ Here are the contents of my new plist: Are there any gotchas here that I might be missing? Thanks!
Replies
12
Boosts
0
Views
1.4k
Activity
Sep ’25
Can I Exporting a Developer ID PacketTunnelProvider Plugin?
I can develop a PacketTunnelProvider on Mac with xcode. I work with my self codesign. But when I sign it with Developer ID after read https://developer.apple.com/forums/thread/737894 , it still fail when I turn on the vpn .
Replies
12
Boosts
0
Views
239
Activity
Sep ’25
Reply to disable-library-validation entitlement makes app unlaunchable
TN3125 is correct in saying that the hardened runtime entitlements are unrestricted, that is, their used doesn’t have to be authorisation by a profile. I’m not sure what’s going with your app but this is working for me: Using Xcode 16.4 on macOS 15.6.1, create a new project from the macOS > Command Line Tool target. In Signing & Capabilities > Hardened Runtime, check the Disable Library Validation box. Build and run; the program runs just fine. Dump the entitlements of the built executable: % codesign -d -vvv --entitlements - Test799497 … CodeDirectory v=20500 size=630 flags=0x10000(runtime) … … [Dict] [Key] com.apple.security.cs.disable-library-validation [Value] [Bool] true … The runtime flag indicates that the hardened runtime is enabled, and the com.apple.security.cs.disable-library-validation entitlement disables library validation. Moreover, this is a command-line tool, and thus it has no provisioning profile. Please repeat the above, just to make sure that we’re on the same page. As
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Best practices for post-build codesigning
My understanding is that Xcode Cloud uses cloud signing [1]. Assuming that, the result you’re seeing make sense. With cloud signing the signing identity is never present in the keychain. Hence the whole “cloud” thing (-: Cloud signing is only supported in Xcode (and xcodebuild). It’s not directly supported by codesign [2]. So, you won’t be able to use it to sign your disk image. That leaves you with a few options: Don’t use a disk image. If it’s just a normal app, distributing it as a zip archive is a reasonable option. Don’t sign your disk image. While I generally recommend that folks sign their disk images, it’s not an absolute requirement. Pass your normal (so, not managed) Developer ID Application signing identity to Xcode Cloud and use that to sign your disk image. I’ll admit that none of these are particularly appealing, and I think it’d make sense for you to file an enhancement request against Xcode Cloud for a better way to deal with this. Please post your bug number, just for the record. Sha
Replies
Boosts
Views
Activity
Sep ’25
3rd-party closed-source XCFramework security
Hey! I am developing a macOS application with the help of an external vendor, who is supplying me with a closed-source XCFramework. In Xcode, when I import their XCFramework bundle, when running the app, or opening a SwiftUI preview, or interacting with the app in any form, I get the familiar dialog: [SDK name].framework Not Opened - Apple could not verify [SDK name].framework is free from malware that may harm your Mac or compromise privacy. (Regardless, the application can run on my machine.) But indeed, their cross-platform iOS/macOS XCFramework is not notarized at all (using spctl -a -t install), plus the macOS binary embedded is not code signed correctly (using codesign -d). The XCFramework itself is production code signed with a Developer ID certificate, however I believed the above issues to be valid. Now, I asked the vendor to provide a correctly distributed (so code signed and notarized) framework, however they pointed out that when I embed and sign the product in my app, it will be re-signe
Replies
3
Boosts
0
Views
197
Activity
Sep ’25
Helper app is sandboxed (entitlement + runtime check), but `URLsForDirectory:` returns user home (`/Users//`) instead of container path — why?
Problem summary I have a macOS helper app that is launched from a sandboxed main app. The helper: has com.apple.security.app-sandbox = true and com.apple.security.inherit = true in its entitlements, is signed and embedded inside the main app bundle (placed next to the main executable in Contents/MacOS), reports entitlement_check = 1 (code signature contains sandbox entitlement, implemented via SecStaticCode… check), sandbox_check(getpid(), NULL, 0) returns 1 (runtime sandbox enforcement present), APP_SANDBOX_CONTAINER_ID environment variable is not present (0). Despite that, Cocoa APIs return non-container home paths: NSHomeDirectory() returns /Users/<me>/ (the real home). [[NSFileManager defaultManager] URLsForDirectory:inDomains:] and URLForDirectory:inDomain:appropriateForURL:create:error: return paths rooted at /Users/<me>/ (not under ~/Library/Containers/<app_id>/Data/...) — i.e. they look like non-sandboxed locations. However, one important exception: URLForDirectory:... for NSItemRepl
Replies
7
Boosts
0
Views
227
Activity
Sep ’25
Mac: Best way to distinguish native app process and script process spawned from executable (e.g. python node) through process_id
I'm working on a Mac app that receives a process ID via NSXPCConnection, and I'm trying to figure out the best way to determine whether that process is a native macOS app like Safari—with bundles and all—or just a script launched by something like Node or Python. The executable is signed with a Team ID using codesign. I was thinking about getting the executable's path as one way to handle it, but I’m wondering if there’s a more reliable method than relying on the folder structure.
Replies
1
Boosts
0
Views
240
Activity
Sep ’25
codesign Failure with errSecInternalComponent Error
I am experiencing a persistent issue when trying to sign my application, PhotoKiosk.app, using codesign. The process consistently fails with the error errSecInternalComponent, and my troubleshooting indicates the problem is with how the system accesses or validates my certificate's trust chain, rather than the certificate itself. Error Details and Configuration: codesign command executed: codesign --force --verbose --options=runtime --entitlements /Users/sergiomordente/Documents/ProjetosPhotocolor/PhotoKiosk-4M/entitlements.plist --sign Developer ID Application: Sérgio Mordente (G75SJ6S9NC) /Users/sergiomordente/Documents/ProjetosPhotocolor/PhotoKiosk-4M/dist/PhotoKiosk.app Error message received: Warning: unable to build chain to self-signed root for signer (null) /Users/sergiomordente/Documents/ProjetosPhotocolor/PhotoKiosk-4M/dist/PhotoKiosk.app: errSecInternalComponent Diagnostic Tests and Verifications Performed: Code Signing Identity Validation: I ran the command security find
Replies
1
Boosts
0
Views
912
Activity
Sep ’25
Reply to Best practices for post-build codesigning
Hi. Yes, the Developer ID identity. Thanks for promoting the use of proper terminology 😁 I've read through a number of your other posts on this forum and found them informative and helpful. And yes, I'm referring to Xcode Cloud. My ci_post_xcodebuild.sh script includes: codesign ... --sign $CODESIGN_IDENTITY diskimage.dmg Where CODESIGN_IDENTITY is the SHA-1 of my Developer ID Application: My Company (MYTEAMID). It unsurprisingly fails with: error: The specified item could not be found in the keychain. I can also see there are no identities in the keychain with: security find-identity -v -p codesigning I'm hoping Xcode Cloud provides me a better way to access the identity than uploading the .p12 to the host... Thanks!
Replies
Boosts
Views
Activity
Sep ’25
Best practices for post-build codesigning
My post-build script takes the developeridexport archive export, zips it up and uses notarytool to notarize it. I then add the .zip to a .dmg disk image. The next step is to codesign the disk image before notarizing that too. The issue is my Developer ID Application certificate is not accessible to the build host. (When I was doing this in Microsoft AppCenter (now defunct), it had a copy of my Developer ID Application certificate.) What steps do I need to take to get the disk image signed for notarization? Thanks! Lance
Replies
6
Boosts
0
Views
415
Activity
Sep ’25