Search results for

“codesign”

3,221 results found

Post

Replies

Boosts

Views

Activity

packet-tunnel-provider-systemextension doesn't work
I am currently creating a MacOS app that uses NetworkExtension and SystemExtension without going through the Store. Using entitlements, I manually codesign and create a pkg Installer, but when I run it I get an error message saying No matching profile found. Below is the log /Applications/Runetale.app/Contents/MacOS/Runetale not valid: Error Domain=AppleMobileFileIntegrityError Code=-413 No matching profile found UserInfo={NSURL=file:///Applications/Runetale.app/, unsatisfiedEntitlements=<CFArray 0x71c040fa0 [0x1f7bec120]>{type = immutable, count = 3, values = ( 0 : <CFString 0x71c04f340 [0x1f7bec120]>{contents = com.apple.developer.system-extension.install} 1 : <CFString 0x71c1ccaf0 [0x1f7bec120]>{contents = com.apple.developer.networking.networkextension} 2 : <CFString 0x71c04fc00 [0x1f7bec120]>{contents = com.apple.developer.team-identifier} )}, NSLocalizedDescription=No matching profile found} I looked into it myself and found that if you want to install the app without go
6
0
235
Apr ’25
Reply to TKTokenSession not used
Looks like I wasn't using the right SHA1 for my cert when calling codesign. I figured I could get the cert information by using security export-smartcard -i [card] | grep sha1 sha1 : After a bit of string manipulation: DC5F8D160FCD0342AE061D70716E114BD438D668 Now when I'm calling codesign -s DC5F8D160FCD0342AE061D70716E114BD438D668 -f foobar I can see the sign method of my TKTokenSession being called. tl;dr: New identity doesn't show up in Keychain, but it doesn't mean the OS can't use it. However you need to make sure you're using the right SHA1.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
AppStore submission for Ruby/Glimmer app on MacOS without Xcode
Background I've repeatedly run into codesigning (and missing provisioning profile) issues for my Ruby/Glimmer app and am looking for ways to troubleshoot this outside of Xcode. The app structure is as follows: PATHmanager.app └── Contents ├── Info.plist ├── MacOS │ └── PATHmanager ├── PkgInfo ├── Resources │ └── AppIcon.icns ├── _CodeSignature │ └── CodeResources └── embedded.provisionprofile Architecture I have a Mac mini Apple M2 Pro with macOS Ventura 13.4. Xcode is not used directly, but the underlying command line tools (e.g., codesign, productbuild, pkgutil, xcrun) are run from a custom Ruby script. xcodebuild -version Xcode 14.3.1 Build version 14E300c Questions Is the .app directory and file structure/naming sufficient? If not, can you point me in the direction of a minimal example that does not use Xcode? Info.plist is an XML text document (not binary), which I believe is in an acceptable format, but how do I lint this file and determine if it contains all of the necessary key/value
Topic: Code Signing SubTopic: General
49
0
1.2k
Apr ’25
Sequoia 'local network' permission failure from launch agent
I'm trying to invoke a 3rd party command line tool from a launch agent to connect to a server on my LAN. It seems impossible. I have a little shell script that does what I need, and it works fine invoked in Terminal.app. The first time I run it that way I get permission prompts and I agree to them all. Subsequent invocations work. Now I put a launch agent in ~/Library/Launch Agents. It does nothing more than invoke my shell script at some specific time daily. launchd launches it, but it fails to access the LAN, with a 'no route to host' error message. The command line tool I'm trying to use is not a macOS-provided one, but one from MacPorts/HomeBrew (I tried both). It doesn't even matter which tool I'm using, I tried a very simple case of just using nc/netcat. If I use the macOS-provided nc, then I can access my LAN. If I install nc from MacPorts /HomeBrew, that nc cannot access my LAN. This I've reproed on a literally brand new Mac, then updated to newest Sequoia (15.3.2), then done all I've described above.
14
0
472
Apr ’25
Reply to packet-tunnel-provider-systemextension doesn't work
automation package installer script I'm using looks like this: set -euo pipefail APP_NAME=Runetale.app APP_BUNDLE=build/macos/Build/Products/Release/${APP_NAME} DEV_ID_APP_CERT=Developer ID Application: MYTEAMID DEV_ID_INSTALLER_CERT=Developer ID Installer: MYTEAMID APP_VERSION=1.0.0 APP_BUNDLE_ID=com.runetale.desktop # Apple credentials for notarization APPLE_ID= TEAM_ID= APP_SPECIFIC_PW= # clean and build rm -rf build flutter clean flutter build macos --release # Ensure the app exists if [ ! -d $APP_BUNDLE ]; then echo Error: $APP_BUNDLE not found. Make sure the app bundle is present. exit 1 fi echo Starting code signing for $APP_BUNDLE... # copy Runetale.app codesign -d -vvv build/macos/Build/Products/Release/Runetale.app ditto $APP_BUNDLE $APP_NAME # copy entitlements codesign -d --entitlements Release.entitlements --xml Runetale.app codesign -d --entitlements PacketTunnelRelease.entitlements --xml Runetale.app/Contents/Library/SystemExtensions/com.runetale.desktop.PacketTunnel.
Apr ’25
Reply to packet-tunnel-provider-systemextension doesn't work
@DTS Engineer Thank you. I read the documentation provided by Apple engineers. I was able to create the installer successfully and launch the application. However, when I try to connect to the VPN, I get the following error: default 16:53:58.419606+0900 Runetale Saving configuration Runetale with existing signature (null) error 16:53:58.420440+0900 Runetale Failed to save configuration Runetale: Error Domain=NEConfigurationErrorDomain Code=10 permission denied UserInfo={NSLocalizedDescription=permission denied} error 16:53:58.420474+0900 Runetale Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 permission denied UserInfo={NSLocalizedDescription=permission denied} error 16:53:58.420407+0900 nehelper Runetale Failed to obtain authorization right for 3: no authorization provided Is there any possible reason for this? The entitlements look like this: App entitlements com.apple.application-identifier myteamid.com.runetale.desktop com.apple.developer.networking.networkextension packet-tunnel-
Apr ’25
Reply to AppStore submission for Ruby/Glimmer app on MacOS without Xcode
To recap, my Ruby files for the app are located under ./app, with the gems being vendored. This library is located at ./app/vendor/bundle/ruby/3.3.0/gems/libui-0.1.2-arm64-darwin/vendor/libui.dylib. I'm curious if I should codesign the libui.dylib before building the binary with Tebako? If so, would I still need to codesign the Contents/Frameworks files under the app bundle? (I'm assuming yes on this latter point.) Thanks in advance for your suggestions.
Topic: Code Signing SubTopic: General
Apr ’25
Getting a public service app not to send scary messages
I’ve developed a macOS app, but I’ve had trouble using a script to fully codesign it and package it into a .dmg file. I was only able to complete codesigning using the third-party app itself—not via command-line scripts. Is it possible to write a script that automates the entire process of codesigning the app? To provide the best user experience for those downloading the app outside of the Mac App Store, is it correct to first package it as a .app and then wrap that into a .dmg file for distribution? Currently, the app is available on the web as a .dmg. When downloaded, it appears in a folder and can be double-clicked to launch. However, macOS displays a warning that it was downloaded from the internet. Can I use a script to remove that quarantine warning? If possible, I’d appreciate a step-by-step explanation and a sample command-line script to: Codesign the app properly Package it into a signed .dmg Remove the quarantine attribute for local testing or distribution Is the
Topic: Code Signing SubTopic: General
3
0
154
Apr ’25
Reply to Getting a public service app not to send scary messages
Can you clarify the warning? Does it say the app was downloaded from the internet and no malware was found? Or does it say something worse? If this is an app downloaded from the internet, then it's going to say it was downloaded from the internet. No way around that unless you want to put it in the Mac App Store. If it is just an app, then there is no reason to put it inside a DMG. Just compress it into a zip file. I have no idea what you mean by complete codesigning using the third-party app itself—not via command-line scripts. Are you saying that you didn't use Xcode to build the app? If so, then you're on your own. You are totally at the mercy of whatever tool you are using to build the app. These things are a single button click in Xcode.
Topic: Code Signing SubTopic: General
Apr ’25
Security warning while installing .pkg file in mac OS desktop
We have a macOS application packaged as a .pkg file. To notarize it, we first code-sign individual library folders and the .app bundle using the following command: codesign --force --deep --sign Developer ID Application: &lt;Our Account Name&gt;, LLC (Team ID) Our_product.app Code Sign result for .app file: Our_prodcut.app: valid on disk Our_product.app: satisfies its Designated Requirement We are using packages tool to create .pkg file with code signed .app file. Steps followed once .pkg file is ready: 1. Product Sign: productsign -sign Developer ID Installer: &lt;Our Account Name&gt; output.pkg signed-output.pkg 2. Submit for notorization: `xcrun notarytool submit signed-outout.pkg --keychain-profile notarytool-password --wait Received following output: Current status: Accepted................................. Processing complete id: 2d5c450f-5b22-4b4d-9579-ef21c0356548 status: Accepted Transferred Notarization log: xcrun notarytool log 10169892-b28c-407c-b348-edab0b34ef34 --keychai
13
0
351
Apr ’25
setCodeSigningRequirement seems not to work in new Service Management API setup.
I have developed a sample app following the example found Updating your app package installer to use the new Service Management API and referring this discussion on XPC Security. The app is working fine, I have used Swift NSXPCConnection in favour of xpc_connection_create_mach_service used in the example. (I am running app directly from Xcode) I am trying to set up security requirements for the client connection using setCodeSigningRequirement on the connection instance. But it fails for even basic requirement connection.setCodeSigningRequirement(anchor apple). Error is as follows. cannot open file at line 46986 of [554764a6e7] os_unix.c:46986: (0) open(/private/var/db/DetachedSignatures) - Undefined error: 0 xpc_support_check_token: anchor apple error: Error Domain=NSOSStatusErrorDomain Code=-67050 (null) status: -67050 I have used codesign -d --verbose=4 /path/to/executable to check the attributes I do get them in the terminal. Other way round, I have tried XPC service provider sending back process
12
0
378
Apr ’25
Reply to "this identity cannot be used for signing code"
Solved (or more like worked around whatever weird issue this was). I realized on this occasion I'd only tried building to VM, not YYC, although I usually tested both in the past if there were any issues. On YYC I was able to build without the codesigning error, after which I needed to open the xcodeproj manually which was located at (macuser)/gamemakerstudio2/GM_MAC/(gamename)/(gamename).
Apr ’25
Reply to setCodeSigningRequirement seems not to work in new Service Management API setup.
Blat! Sometimes I can’t see the wood for the trees )-: I downloaded your project today, installed it, re-enabled the setCodeSigningRequirement(_:) call, and then reproduced the problem. Cool. The error code logged, -67050, is errSecCSReqFailed, aka: % security error -67050 Error: 0xFFFEFA16 -67050 code failed to satisfy specified code requirement(s) This is very specific. The code doesn’t satisfy the requirement. So after a bit of faffing around I used codesign to actually test the requirement on that code: % codesign --verify -vvv -R =anchor apple AppleDTSLaunchDaemon1.app/Contents/Resources/DTSDaemon … test-requirement: code failed to satisfy specified code requirement(s) Well, that explains why XPC is complaining! But this should work, because the code is properly signed: % codesign -d -vvv AppleDTSLaunchDaemon1.app/Contents/Resources/DTSDaemon … Authority=Apple Development: Quinn Quinn (7XFU7D52S4) … And then it struck me. anchor apple is the wrong requirement. It checks whether
Topic: Privacy & Security SubTopic: General Tags:
Apr ’25
Reply to codesign - edited signature
There are a number of potential issues here. First: [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] codesign -s My Name --keychain keychain -f --deep … [/quote] Don’t use --deep when signing code. See --deep Considered Harmful for an explanation as to why not. As to what you should do, I’ll come back to that below. [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] Unfortunately this signed package does not work when checking with spctl. [/quote] It’s generally best to avoid spctl for this sort of thing. If you want to test whether something will pass Gatekeeper, use the process described in Testing a Notarised Product. [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] codesign -dv -veurbose=4 RenderRob.app/Contents/MacOS/libcrypto.3.dylib [/quote] That definitely belongs in Contents/Frameworks. See Placing Content in a Bundle. Coming back to how you should sign your code, there’s a general process for that described in: Creating distributi
Apr ’25
Reply to Multiple Executables in a Single Bundle Fails to Launch Others After Codesign
[quote='833266022, mmccartney, /thread/778169?answerId=833266022#833266022, /profile/mmccartney'] Perhaps this is because we're trying to run things not delivered by the Mac Store yet. [/quote] If you’re trying to run a distribution-signed app then, yeah, that won’t work. See Don’t Run App Store Distribution-Signed Code. However, it seems like you were also testing development-signed app and that’s also failing. I tried your setup from Xcode, just to make sure that I wasn’t completely misleading you. AFAICT everything worked as expected. Here’s what I did: Using Xcode 16.3 on macOS 15.3.2, I created a new app from the macOS > App template. I then ran through the instructions in Embedding a command-line tool in a sandboxed app to create a new helper tool target and embed the results. I added a button that launched it: Button(Spawn) { do { print(will launch) let p = Process() let u = Bundle.main.url(forAuxiliaryExecutable: ToolX)! p.executableURL = u try p.run() print(did launch) } catch { print(did not laun
Topic: Code Signing SubTopic: General Tags:
Apr ’25
packet-tunnel-provider-systemextension doesn't work
I am currently creating a MacOS app that uses NetworkExtension and SystemExtension without going through the Store. Using entitlements, I manually codesign and create a pkg Installer, but when I run it I get an error message saying No matching profile found. Below is the log /Applications/Runetale.app/Contents/MacOS/Runetale not valid: Error Domain=AppleMobileFileIntegrityError Code=-413 No matching profile found UserInfo={NSURL=file:///Applications/Runetale.app/, unsatisfiedEntitlements=<CFArray 0x71c040fa0 [0x1f7bec120]>{type = immutable, count = 3, values = ( 0 : <CFString 0x71c04f340 [0x1f7bec120]>{contents = com.apple.developer.system-extension.install} 1 : <CFString 0x71c1ccaf0 [0x1f7bec120]>{contents = com.apple.developer.networking.networkextension} 2 : <CFString 0x71c04fc00 [0x1f7bec120]>{contents = com.apple.developer.team-identifier} )}, NSLocalizedDescription=No matching profile found} I looked into it myself and found that if you want to install the app without go
Replies
6
Boosts
0
Views
235
Activity
Apr ’25
Reply to TKTokenSession not used
Looks like I wasn't using the right SHA1 for my cert when calling codesign. I figured I could get the cert information by using security export-smartcard -i [card] | grep sha1 sha1 : After a bit of string manipulation: DC5F8D160FCD0342AE061D70716E114BD438D668 Now when I'm calling codesign -s DC5F8D160FCD0342AE061D70716E114BD438D668 -f foobar I can see the sign method of my TKTokenSession being called. tl;dr: New identity doesn't show up in Keychain, but it doesn't mean the OS can't use it. However you need to make sure you're using the right SHA1.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’25
AppStore submission for Ruby/Glimmer app on MacOS without Xcode
Background I've repeatedly run into codesigning (and missing provisioning profile) issues for my Ruby/Glimmer app and am looking for ways to troubleshoot this outside of Xcode. The app structure is as follows: PATHmanager.app └── Contents ├── Info.plist ├── MacOS │ └── PATHmanager ├── PkgInfo ├── Resources │ └── AppIcon.icns ├── _CodeSignature │ └── CodeResources └── embedded.provisionprofile Architecture I have a Mac mini Apple M2 Pro with macOS Ventura 13.4. Xcode is not used directly, but the underlying command line tools (e.g., codesign, productbuild, pkgutil, xcrun) are run from a custom Ruby script. xcodebuild -version Xcode 14.3.1 Build version 14E300c Questions Is the .app directory and file structure/naming sufficient? If not, can you point me in the direction of a minimal example that does not use Xcode? Info.plist is an XML text document (not binary), which I believe is in an acceptable format, but how do I lint this file and determine if it contains all of the necessary key/value
Topic: Code Signing SubTopic: General
Replies
49
Boosts
0
Views
1.2k
Activity
Apr ’25
Sequoia 'local network' permission failure from launch agent
I'm trying to invoke a 3rd party command line tool from a launch agent to connect to a server on my LAN. It seems impossible. I have a little shell script that does what I need, and it works fine invoked in Terminal.app. The first time I run it that way I get permission prompts and I agree to them all. Subsequent invocations work. Now I put a launch agent in ~/Library/Launch Agents. It does nothing more than invoke my shell script at some specific time daily. launchd launches it, but it fails to access the LAN, with a 'no route to host' error message. The command line tool I'm trying to use is not a macOS-provided one, but one from MacPorts/HomeBrew (I tried both). It doesn't even matter which tool I'm using, I tried a very simple case of just using nc/netcat. If I use the macOS-provided nc, then I can access my LAN. If I install nc from MacPorts /HomeBrew, that nc cannot access my LAN. This I've reproed on a literally brand new Mac, then updated to newest Sequoia (15.3.2), then done all I've described above.
Replies
14
Boosts
0
Views
472
Activity
Apr ’25
Reply to packet-tunnel-provider-systemextension doesn't work
automation package installer script I'm using looks like this: set -euo pipefail APP_NAME=Runetale.app APP_BUNDLE=build/macos/Build/Products/Release/${APP_NAME} DEV_ID_APP_CERT=Developer ID Application: MYTEAMID DEV_ID_INSTALLER_CERT=Developer ID Installer: MYTEAMID APP_VERSION=1.0.0 APP_BUNDLE_ID=com.runetale.desktop # Apple credentials for notarization APPLE_ID= TEAM_ID= APP_SPECIFIC_PW= # clean and build rm -rf build flutter clean flutter build macos --release # Ensure the app exists if [ ! -d $APP_BUNDLE ]; then echo Error: $APP_BUNDLE not found. Make sure the app bundle is present. exit 1 fi echo Starting code signing for $APP_BUNDLE... # copy Runetale.app codesign -d -vvv build/macos/Build/Products/Release/Runetale.app ditto $APP_BUNDLE $APP_NAME # copy entitlements codesign -d --entitlements Release.entitlements --xml Runetale.app codesign -d --entitlements PacketTunnelRelease.entitlements --xml Runetale.app/Contents/Library/SystemExtensions/com.runetale.desktop.PacketTunnel.
Replies
Boosts
Views
Activity
Apr ’25
Reply to packet-tunnel-provider-systemextension doesn't work
@DTS Engineer Thank you. I read the documentation provided by Apple engineers. I was able to create the installer successfully and launch the application. However, when I try to connect to the VPN, I get the following error: default 16:53:58.419606+0900 Runetale Saving configuration Runetale with existing signature (null) error 16:53:58.420440+0900 Runetale Failed to save configuration Runetale: Error Domain=NEConfigurationErrorDomain Code=10 permission denied UserInfo={NSLocalizedDescription=permission denied} error 16:53:58.420474+0900 Runetale Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 permission denied UserInfo={NSLocalizedDescription=permission denied} error 16:53:58.420407+0900 nehelper Runetale Failed to obtain authorization right for 3: no authorization provided Is there any possible reason for this? The entitlements look like this: App entitlements com.apple.application-identifier myteamid.com.runetale.desktop com.apple.developer.networking.networkextension packet-tunnel-
Replies
Boosts
Views
Activity
Apr ’25
Reply to AppStore submission for Ruby/Glimmer app on MacOS without Xcode
To recap, my Ruby files for the app are located under ./app, with the gems being vendored. This library is located at ./app/vendor/bundle/ruby/3.3.0/gems/libui-0.1.2-arm64-darwin/vendor/libui.dylib. I'm curious if I should codesign the libui.dylib before building the binary with Tebako? If so, would I still need to codesign the Contents/Frameworks files under the app bundle? (I'm assuming yes on this latter point.) Thanks in advance for your suggestions.
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
Apr ’25
Getting a public service app not to send scary messages
I’ve developed a macOS app, but I’ve had trouble using a script to fully codesign it and package it into a .dmg file. I was only able to complete codesigning using the third-party app itself—not via command-line scripts. Is it possible to write a script that automates the entire process of codesigning the app? To provide the best user experience for those downloading the app outside of the Mac App Store, is it correct to first package it as a .app and then wrap that into a .dmg file for distribution? Currently, the app is available on the web as a .dmg. When downloaded, it appears in a folder and can be double-clicked to launch. However, macOS displays a warning that it was downloaded from the internet. Can I use a script to remove that quarantine warning? If possible, I’d appreciate a step-by-step explanation and a sample command-line script to: Codesign the app properly Package it into a signed .dmg Remove the quarantine attribute for local testing or distribution Is the
Topic: Code Signing SubTopic: General
Replies
3
Boosts
0
Views
154
Activity
Apr ’25
Reply to Getting a public service app not to send scary messages
Can you clarify the warning? Does it say the app was downloaded from the internet and no malware was found? Or does it say something worse? If this is an app downloaded from the internet, then it's going to say it was downloaded from the internet. No way around that unless you want to put it in the Mac App Store. If it is just an app, then there is no reason to put it inside a DMG. Just compress it into a zip file. I have no idea what you mean by complete codesigning using the third-party app itself—not via command-line scripts. Are you saying that you didn't use Xcode to build the app? If so, then you're on your own. You are totally at the mercy of whatever tool you are using to build the app. These things are a single button click in Xcode.
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
Apr ’25
Security warning while installing .pkg file in mac OS desktop
We have a macOS application packaged as a .pkg file. To notarize it, we first code-sign individual library folders and the .app bundle using the following command: codesign --force --deep --sign Developer ID Application: &lt;Our Account Name&gt;, LLC (Team ID) Our_product.app Code Sign result for .app file: Our_prodcut.app: valid on disk Our_product.app: satisfies its Designated Requirement We are using packages tool to create .pkg file with code signed .app file. Steps followed once .pkg file is ready: 1. Product Sign: productsign -sign Developer ID Installer: &lt;Our Account Name&gt; output.pkg signed-output.pkg 2. Submit for notorization: `xcrun notarytool submit signed-outout.pkg --keychain-profile notarytool-password --wait Received following output: Current status: Accepted................................. Processing complete id: 2d5c450f-5b22-4b4d-9579-ef21c0356548 status: Accepted Transferred Notarization log: xcrun notarytool log 10169892-b28c-407c-b348-edab0b34ef34 --keychai
Replies
13
Boosts
0
Views
351
Activity
Apr ’25
setCodeSigningRequirement seems not to work in new Service Management API setup.
I have developed a sample app following the example found Updating your app package installer to use the new Service Management API and referring this discussion on XPC Security. The app is working fine, I have used Swift NSXPCConnection in favour of xpc_connection_create_mach_service used in the example. (I am running app directly from Xcode) I am trying to set up security requirements for the client connection using setCodeSigningRequirement on the connection instance. But it fails for even basic requirement connection.setCodeSigningRequirement(anchor apple). Error is as follows. cannot open file at line 46986 of [554764a6e7] os_unix.c:46986: (0) open(/private/var/db/DetachedSignatures) - Undefined error: 0 xpc_support_check_token: anchor apple error: Error Domain=NSOSStatusErrorDomain Code=-67050 (null) status: -67050 I have used codesign -d --verbose=4 /path/to/executable to check the attributes I do get them in the terminal. Other way round, I have tried XPC service provider sending back process
Replies
12
Boosts
0
Views
378
Activity
Apr ’25
Reply to "this identity cannot be used for signing code"
Solved (or more like worked around whatever weird issue this was). I realized on this occasion I'd only tried building to VM, not YYC, although I usually tested both in the past if there were any issues. On YYC I was able to build without the codesigning error, after which I needed to open the xcodeproj manually which was located at (macuser)/gamemakerstudio2/GM_MAC/(gamename)/(gamename).
Replies
Boosts
Views
Activity
Apr ’25
Reply to setCodeSigningRequirement seems not to work in new Service Management API setup.
Blat! Sometimes I can’t see the wood for the trees )-: I downloaded your project today, installed it, re-enabled the setCodeSigningRequirement(_:) call, and then reproduced the problem. Cool. The error code logged, -67050, is errSecCSReqFailed, aka: % security error -67050 Error: 0xFFFEFA16 -67050 code failed to satisfy specified code requirement(s) This is very specific. The code doesn’t satisfy the requirement. So after a bit of faffing around I used codesign to actually test the requirement on that code: % codesign --verify -vvv -R =anchor apple AppleDTSLaunchDaemon1.app/Contents/Resources/DTSDaemon … test-requirement: code failed to satisfy specified code requirement(s) Well, that explains why XPC is complaining! But this should work, because the code is properly signed: % codesign -d -vvv AppleDTSLaunchDaemon1.app/Contents/Resources/DTSDaemon … Authority=Apple Development: Quinn Quinn (7XFU7D52S4) … And then it struck me. anchor apple is the wrong requirement. It checks whether
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to codesign - edited signature
There are a number of potential issues here. First: [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] codesign -s My Name --keychain keychain -f --deep … [/quote] Don’t use --deep when signing code. See --deep Considered Harmful for an explanation as to why not. As to what you should do, I’ll come back to that below. [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] Unfortunately this signed package does not work when checking with spctl. [/quote] It’s generally best to avoid spctl for this sort of thing. If you want to test whether something will pass Gatekeeper, use the process described in Testing a Notarised Product. [quote='779961021, dreisicht, /thread/779961, /profile/dreisicht'] codesign -dv -veurbose=4 RenderRob.app/Contents/MacOS/libcrypto.3.dylib [/quote] That definitely belongs in Contents/Frameworks. See Placing Content in a Bundle. Coming back to how you should sign your code, there’s a general process for that described in: Creating distributi
Replies
Boosts
Views
Activity
Apr ’25
Reply to Multiple Executables in a Single Bundle Fails to Launch Others After Codesign
[quote='833266022, mmccartney, /thread/778169?answerId=833266022#833266022, /profile/mmccartney'] Perhaps this is because we're trying to run things not delivered by the Mac Store yet. [/quote] If you’re trying to run a distribution-signed app then, yeah, that won’t work. See Don’t Run App Store Distribution-Signed Code. However, it seems like you were also testing development-signed app and that’s also failing. I tried your setup from Xcode, just to make sure that I wasn’t completely misleading you. AFAICT everything worked as expected. Here’s what I did: Using Xcode 16.3 on macOS 15.3.2, I created a new app from the macOS > App template. I then ran through the instructions in Embedding a command-line tool in a sandboxed app to create a new helper tool target and embed the results. I added a button that launched it: Button(Spawn) { do { print(will launch) let p = Process() let u = Bundle.main.url(forAuxiliaryExecutable: ToolX)! p.executableURL = u try p.run() print(did launch) } catch { print(did not laun
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’25