Search results for

“codesign”

3,222 results found

Post

Replies

Boosts

Views

Activity

App Startup Issues after Upgrade to MacOS Sequoia
Short description of the issue/suggestion: After upgrading to MacOS Sequoia and being required to code sign and notarize my app, cannot launch app even though code sign and notarization pass Please tell us about your environment: MacBookPro Chip Apple M2 Max 32 GB JavaPackager version: 1.7.6 OS version: macOS Sequoia 15.0.1 JDK version: jdk-1.8 Build tool: Maven Steps to reproduce the issue: -DMG Maven Build of Spring Boot /Java (version 8) application with fvarrui JavaPackager plugin using default universalJavaApplicationStub. Code signing and Notarization / Stapling PASS and App installs in Application folder, however cannot launch App. Although code sign and notarization pass, it is interesting that in the build output, prior to it submitting to Apple, there is an error stating that the App code sign could not be replaced. What is the expected behavior? -App launches when double clicking the application icon What have you tried to resolve / workaround the issue? -Install via package rather than DMG - same
Topic: Code Signing SubTopic: General
5
0
697
Jan ’25
Unnotarized Developer ID
I'm new to notarizing applications. I'm building an Electron application using electron-packager. The signing looks solid: codesign -vvv --deep --strict path/to/app.app # satisfies its Designated Requirement But checking notarization, looks like it didn't work. spctl --assess -vv path/to/app.app # source=Unnotarized Developer ID # origin=Developer ID Application: Tyson XXXX (XXXXX) I'm wondering how to fix the Unnotarized Developer ID. Thanks!
1
0
481
Jan ’25
Reply to dlopen on development iPhone codesign issue
One curious thing I am seeing is that: codesign -vv -d --verbose testlibrary-ios.dylib outputs: Executable=/Users/joe/sources/Curiosity/hotreload/cmake-build-debug/testlibrary-ios.dylib Identifier=testlibrary-ios Format=Mach-O thin (arm64) ... It surprised me that my dylib has an Executable= with the path to the dylib. Is this expected and could it be related to my problem?
Topic: Code Signing SubTopic: General Tags:
Jan ’25
dlopen on development iPhone codesign issue
Hi, For the purposes of iteration speed in development builds, on an iPhone in development mode, I am attempting to use hot reloaded dylibs. The goal is that the app is rarely fully restarted and small code changes can be applied quickly, drastically reducing iteration speed. For this purpose I have a socket server on my Mac that sends changed dylibs to my app on my iPhone. This works great on Mac, however on iOS i am running into codesigning problems. I am using the following to codesign the dylib: codesign -f -s XXX --timestamp=none testlibrary-ios.dylib I am placing the downloaded dylib in this folder: const char* cachedirectoryPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0] UTF8String]; dlopen gives me the following error: dlopen(/var/mobile/Containers/Data/Application/67A3D31B-6F72-4939-9E7F-665FC78CDC61/Library/Caches/testlibrary-ios.dylib, 0x000A): tried: '/usr/lib/system/introspection/testlibrary-ios.dylib' (no such file, not in dyld
5
0
633
Jan ’25
Reply to codesign entitlements syntax error
I know this is a very old post but I just ran into the same problem (for an iOS app) and I think I figured it out. This is not an invalid XML so the error is misleading, and that's why plutil has no trouble with it. The problem is datetime format: 2038-01-31T11:46:58Z This is a fully-qualified ISO date but it looks like the codesign tool chokes on it. I was able to work around this by truncating the time part and keeping just the date: 2038-01-31 With this change, I was able to sign and deploy my app to my physical device.
Jan ’25
Reply to codesign error - No such file or directory
[quote='773118021, dickL45, /thread/773118, /profile/dickL45'] Yours baffled [/quote] This is a weird error. I’ve seen in before [1] but I’ve not yet worked out exactly how to trigger it. Problems like this are almost always the result of folks not following the rules described in Placing Content in a Bundle. However, it’s hard to debug this with just the error message you’re getting from codesign. Two things: If you add more -v flags to codesign, does the verbose logging reveal anything? If not, are you willing to share a copy of the ALP_Document_Factory_II.app? If so, zip it up and reply here with the URL. ps I recommend you have a read of Quinn’s Top Ten DevForums Tips. Specifically tip 5’s info about preformatted text and tip 14 about posting URLs. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] For example, here.
Topic: Code Signing SubTopic: General Tags:
Jan ’25
Reply to Auditing code signatures
So I also asked about this internally and have something I’d like you to try. If you dump a code signature with enough -v options, you eventually get to the CMSDigest field. Does that line up with your signing operations? % codesign -d --arch arm64 -vvvvv /Applications/Pages.app … CMSDigest=4380386763a016bee5fbfbf362f7c9c05bb1a5ea2d5ed9535b371fb36223e3e6 … % codesign -d --arch x86_64 -vvvvv /Applications/Pages.app … CMSDigest=d4d89d97cc94daa5437f14f02490a4a9efd9eece7ca22150d807df344c36d3c9 … Note that it’s different for each architecture. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: General Tags:
Jan ’25
codesign error - No such file or directory
I'm having a problem with codesign for output from Pyinstaller The files are in ~/PycharmProjects/ALP_Document_Factory_II That folder contains the icon file, the entitlement file, and also contains a dist folder where Pyinstaller places the app file (ALP_Document_Factory_II.app) The generated app works and runs when I double click it. When I run codesign: codesign -s xxxxxxxx -f --entitlements entitlements.plist -o runtime dist/ALP_Document_Factory_II.app (xxxxxxx is where I place the hash of my credential) I get the following error message: No such file or directory Here is the Terminal copy... minus my Hash dickl45@Dicks-iMac3 ALP_Document_Factory_II % codesign -s xxxxxxxxxx -f --entitlements entitlements.plist -o runtime dist/ALP_Document_Factory_II.app dist/ALP_Document_Factory_II.app: No such file or directory Earlier I was able to use codesign and notarytool, but I must be doing something wrong that I can't see. Yours baffled MacOs 15.2
4
0
598
Jan ’25
Unable to use XCode Auto-sign for a project with network + system extension
Hi, We are developing software that configures a network extension via a system extension on MacOS. The host application (run as service) enables network extension and system extension capabilities. It registers the network extension. The network extension has network extension capabilities and configures an app-group to be bundled into the service. What we have built is already working, i.e. we build, sign, notarize and ship the code (it's already running on hundreds of SIP enabled customer devices in production). But, we are currently falling back to manual profile management (i.e. download and import the profile) so that Xcode accepts the entitlements suffixed with -systemextention. Recently we are testing deployment on iOS devices. For iOS profiles we cannot overcome the issues with setting the profile manually, XCode complains about mismatching networkextension entitlements even when manually importing the profile. So I thought I get to the bottom of why automated signing is not working and hopefully ove
1
0
570
Jan ’25
How to build an iOS app using the command line on macOS Sonoma?
Hello, Now we support Apple applications and we are building applications on Mac laptops with regular updates. Our goal is to build an iOS app entirely through the command line using xcodebuild and other tools from Xcode Command Line Tools on a server with _macOS Sonoma (14.6.1) without a graphical user interface (only the command line)!!! We need to build and regularly update iOS applications on clients and our accounts and we are looking for a solution to fully automate the login process for these accounts. Our goal is to automate these processes on a server without involving a customer. Here’s what I need help with building and signing the app: What are the proper commands to build and sign the app using xcodebuild and put this application in Apple Store? Server has: xcode-select -version xcode-select version 2408. xcodebuild -version Xcode 16.1 Build version 16B40. In the first step, the certificates have been added to the keychain. We have two keychains. We can check it by running the command: security l
1
0
355
Jan ’25
Reply to The staple and validate action failed! Error 65.
Error 65 means that there is no ticket for the thing you’re trying to staple. The usually means that your notarisation failed but, as you’ve shown here, the notarisation actually succeeded. So either you’re stapling something that you didn’t notarise or the notary service didn’t recognise all of your code, and thus failed to include the relevant value in your ticket. Before you start debugging this specific problems, there are two parts to your process that you need to fix. The first is this: [quote='772807021, PeteMinus, /thread/772807, /profile/PeteMinus'] codesign --deep --force --options runtime … [/quote] Don’t sign code with --deep. See --deep Considered Harmful for an explanation as to why that’s bad. For advice on how to sign and package your code, see: Creating distribution-signed code for macOS Packaging Mac software for distribution The second fix relates to this: [quote='772807021, PeteMinus, /thread/772807, /profile/PeteMinus'] ditto -c -k --sequesterRsrc --keepParent dist/mac-arm64/Mode
Jan ’25
Reply to ICDeviceBrowser, PTP tethering, not working in macOS 14.2?
Hello, have you solved this issue? I also use ImageCaptureCore to develop digital cameras tether software. During the development process, I found that the software uses temporary signatures and ICDeviceBrowser can search for devices, but after using formal signatures, it cannot search for any devices. Use the following two commands to temporarily sign: codesign --remove-signature codesign --sign - hope to get your reply! BR,
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’25
The staple and validate action failed! Error 65.
I've tried to sign/notarize/staple my Electron app via electron-builder, using electron-notarize. I tried it as well in cmd line - both times, same result. Code signing runs without a problem. Notarize (I did wait two days first time, now it's couple of minutes) Stapling - failure `Downloaded ticket has been stored at file:///var/folders/.... Could not validate ticket for.... The staple and validate action failed! Error 65. ` I've checked, and the tickets are downloaded to said folder. My process: `codesign --deep --force --options runtime --entitlements build/entitlements.mac.plist --sign Developer ID Application: Pete... dist/mac-arm64/Modelist.app` ditto -c -k --sequesterRsrc --keepParent dist/mac-arm64/Modelist.app dist/mac-arm64/Modelist.zip xcrun notarytool submit dist/mac-arm64/Modelist.zip --apple-id email --password app_specific_pass --team-id team_id --wait Conducting pre-submission checks for Modelist.zip and initiating connection to the Apple notary service... Submission ID receive
4
0
1.2k
Jan ’25
Auditing code signatures
We are trying to get much more serious about our ability to audit signed code and trace it back to a signing event. We have a signing service that includes a bit of client code that provides a CryptoTokenKit extension to expose the signing certificate to codesign and Xcode. The private keys are held by the signing service and access is strictly controlled. The CTK extension is given a message/digest to sign, and from reading TN 3126, I believe this is representative of the code directory. For an audit trail, we can record some metadata about the signing request, such as Git repository, branch, commit SHA, etc., but the only value linked to the thing being signed is this blob. Later, if we have an app and want to link it back to the signing event, I can't figure out how to find this blob. It's not the CDHash or any other value I see in the output of codesign -d -vvvvvv. is there a way to recreate that blob given a signed artifact?
5
0
612
Jan ’25
Reply to How to count the number of signed files
[quote='821436022, mariocst, /thread/772549?answerId=821436022#821436022, /profile/mariocst'] We execute the codesign inside a CI pipeline. [/quote] So you want to generate this report at build time on a machine you control? If so, you could do this by parsing the CodeResources file within the signed bundle. See TN3126 Inside Code Signing: Hashes. WARNING Don’t do this on the user’s device. Quoting TN3126 “The structure of a code signature has changed numerous times in the past and may well change again in the future.” However, doing this on your CI machine should be fine because, if it breaks, only you are affected. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: General
Jan ’25
App Startup Issues after Upgrade to MacOS Sequoia
Short description of the issue/suggestion: After upgrading to MacOS Sequoia and being required to code sign and notarize my app, cannot launch app even though code sign and notarization pass Please tell us about your environment: MacBookPro Chip Apple M2 Max 32 GB JavaPackager version: 1.7.6 OS version: macOS Sequoia 15.0.1 JDK version: jdk-1.8 Build tool: Maven Steps to reproduce the issue: -DMG Maven Build of Spring Boot /Java (version 8) application with fvarrui JavaPackager plugin using default universalJavaApplicationStub. Code signing and Notarization / Stapling PASS and App installs in Application folder, however cannot launch App. Although code sign and notarization pass, it is interesting that in the build output, prior to it submitting to Apple, there is an error stating that the App code sign could not be replaced. What is the expected behavior? -App launches when double clicking the application icon What have you tried to resolve / workaround the issue? -Install via package rather than DMG - same
Topic: Code Signing SubTopic: General
Replies
5
Boosts
0
Views
697
Activity
Jan ’25
Unnotarized Developer ID
I'm new to notarizing applications. I'm building an Electron application using electron-packager. The signing looks solid: codesign -vvv --deep --strict path/to/app.app # satisfies its Designated Requirement But checking notarization, looks like it didn't work. spctl --assess -vv path/to/app.app # source=Unnotarized Developer ID # origin=Developer ID Application: Tyson XXXX (XXXXX) I'm wondering how to fix the Unnotarized Developer ID. Thanks!
Replies
1
Boosts
0
Views
481
Activity
Jan ’25
Reply to dlopen on development iPhone codesign issue
One curious thing I am seeing is that: codesign -vv -d --verbose testlibrary-ios.dylib outputs: Executable=/Users/joe/sources/Curiosity/hotreload/cmake-build-debug/testlibrary-ios.dylib Identifier=testlibrary-ios Format=Mach-O thin (arm64) ... It surprised me that my dylib has an Executable= with the path to the dylib. Is this expected and could it be related to my problem?
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
dlopen on development iPhone codesign issue
Hi, For the purposes of iteration speed in development builds, on an iPhone in development mode, I am attempting to use hot reloaded dylibs. The goal is that the app is rarely fully restarted and small code changes can be applied quickly, drastically reducing iteration speed. For this purpose I have a socket server on my Mac that sends changed dylibs to my app on my iPhone. This works great on Mac, however on iOS i am running into codesigning problems. I am using the following to codesign the dylib: codesign -f -s XXX --timestamp=none testlibrary-ios.dylib I am placing the downloaded dylib in this folder: const char* cachedirectoryPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0] UTF8String]; dlopen gives me the following error: dlopen(/var/mobile/Containers/Data/Application/67A3D31B-6F72-4939-9E7F-665FC78CDC61/Library/Caches/testlibrary-ios.dylib, 0x000A): tried: '/usr/lib/system/introspection/testlibrary-ios.dylib' (no such file, not in dyld
Replies
5
Boosts
0
Views
633
Activity
Jan ’25
Reply to codesign entitlements syntax error
I know this is a very old post but I just ran into the same problem (for an iOS app) and I think I figured it out. This is not an invalid XML so the error is misleading, and that's why plutil has no trouble with it. The problem is datetime format: 2038-01-31T11:46:58Z This is a fully-qualified ISO date but it looks like the codesign tool chokes on it. I was able to work around this by truncating the time part and keeping just the date: 2038-01-31 With this change, I was able to sign and deploy my app to my physical device.
Replies
Boosts
Views
Activity
Jan ’25
Reply to codesign error - No such file or directory
[quote='773118021, dickL45, /thread/773118, /profile/dickL45'] Yours baffled [/quote] This is a weird error. I’ve seen in before [1] but I’ve not yet worked out exactly how to trigger it. Problems like this are almost always the result of folks not following the rules described in Placing Content in a Bundle. However, it’s hard to debug this with just the error message you’re getting from codesign. Two things: If you add more -v flags to codesign, does the verbose logging reveal anything? If not, are you willing to share a copy of the ALP_Document_Factory_II.app? If so, zip it up and reply here with the URL. ps I recommend you have a read of Quinn’s Top Ten DevForums Tips. Specifically tip 5’s info about preformatted text and tip 14 about posting URLs. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] For example, here.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Auditing code signatures
So I also asked about this internally and have something I’d like you to try. If you dump a code signature with enough -v options, you eventually get to the CMSDigest field. Does that line up with your signing operations? % codesign -d --arch arm64 -vvvvv /Applications/Pages.app … CMSDigest=4380386763a016bee5fbfbf362f7c9c05bb1a5ea2d5ed9535b371fb36223e3e6 … % codesign -d --arch x86_64 -vvvvv /Applications/Pages.app … CMSDigest=d4d89d97cc94daa5437f14f02490a4a9efd9eece7ca22150d807df344c36d3c9 … Note that it’s different for each architecture. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
codesign error - No such file or directory
I'm having a problem with codesign for output from Pyinstaller The files are in ~/PycharmProjects/ALP_Document_Factory_II That folder contains the icon file, the entitlement file, and also contains a dist folder where Pyinstaller places the app file (ALP_Document_Factory_II.app) The generated app works and runs when I double click it. When I run codesign: codesign -s xxxxxxxx -f --entitlements entitlements.plist -o runtime dist/ALP_Document_Factory_II.app (xxxxxxx is where I place the hash of my credential) I get the following error message: No such file or directory Here is the Terminal copy... minus my Hash dickl45@Dicks-iMac3 ALP_Document_Factory_II % codesign -s xxxxxxxxxx -f --entitlements entitlements.plist -o runtime dist/ALP_Document_Factory_II.app dist/ALP_Document_Factory_II.app: No such file or directory Earlier I was able to use codesign and notarytool, but I must be doing something wrong that I can't see. Yours baffled MacOs 15.2
Replies
4
Boosts
0
Views
598
Activity
Jan ’25
Unable to use XCode Auto-sign for a project with network + system extension
Hi, We are developing software that configures a network extension via a system extension on MacOS. The host application (run as service) enables network extension and system extension capabilities. It registers the network extension. The network extension has network extension capabilities and configures an app-group to be bundled into the service. What we have built is already working, i.e. we build, sign, notarize and ship the code (it's already running on hundreds of SIP enabled customer devices in production). But, we are currently falling back to manual profile management (i.e. download and import the profile) so that Xcode accepts the entitlements suffixed with -systemextention. Recently we are testing deployment on iOS devices. For iOS profiles we cannot overcome the issues with setting the profile manually, XCode complains about mismatching networkextension entitlements even when manually importing the profile. So I thought I get to the bottom of why automated signing is not working and hopefully ove
Replies
1
Boosts
0
Views
570
Activity
Jan ’25
How to build an iOS app using the command line on macOS Sonoma?
Hello, Now we support Apple applications and we are building applications on Mac laptops with regular updates. Our goal is to build an iOS app entirely through the command line using xcodebuild and other tools from Xcode Command Line Tools on a server with _macOS Sonoma (14.6.1) without a graphical user interface (only the command line)!!! We need to build and regularly update iOS applications on clients and our accounts and we are looking for a solution to fully automate the login process for these accounts. Our goal is to automate these processes on a server without involving a customer. Here’s what I need help with building and signing the app: What are the proper commands to build and sign the app using xcodebuild and put this application in Apple Store? Server has: xcode-select -version xcode-select version 2408. xcodebuild -version Xcode 16.1 Build version 16B40. In the first step, the certificates have been added to the keychain. We have two keychains. We can check it by running the command: security l
Replies
1
Boosts
0
Views
355
Activity
Jan ’25
Reply to The staple and validate action failed! Error 65.
Error 65 means that there is no ticket for the thing you’re trying to staple. The usually means that your notarisation failed but, as you’ve shown here, the notarisation actually succeeded. So either you’re stapling something that you didn’t notarise or the notary service didn’t recognise all of your code, and thus failed to include the relevant value in your ticket. Before you start debugging this specific problems, there are two parts to your process that you need to fix. The first is this: [quote='772807021, PeteMinus, /thread/772807, /profile/PeteMinus'] codesign --deep --force --options runtime … [/quote] Don’t sign code with --deep. See --deep Considered Harmful for an explanation as to why that’s bad. For advice on how to sign and package your code, see: Creating distribution-signed code for macOS Packaging Mac software for distribution The second fix relates to this: [quote='772807021, PeteMinus, /thread/772807, /profile/PeteMinus'] ditto -c -k --sequesterRsrc --keepParent dist/mac-arm64/Mode
Replies
Boosts
Views
Activity
Jan ’25
Reply to ICDeviceBrowser, PTP tethering, not working in macOS 14.2?
Hello, have you solved this issue? I also use ImageCaptureCore to develop digital cameras tether software. During the development process, I found that the software uses temporary signatures and ICDeviceBrowser can search for devices, but after using formal signatures, it cannot search for any devices. Use the following two commands to temporarily sign: codesign --remove-signature codesign --sign - hope to get your reply! BR,
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’25
The staple and validate action failed! Error 65.
I've tried to sign/notarize/staple my Electron app via electron-builder, using electron-notarize. I tried it as well in cmd line - both times, same result. Code signing runs without a problem. Notarize (I did wait two days first time, now it's couple of minutes) Stapling - failure `Downloaded ticket has been stored at file:///var/folders/.... Could not validate ticket for.... The staple and validate action failed! Error 65. ` I've checked, and the tickets are downloaded to said folder. My process: `codesign --deep --force --options runtime --entitlements build/entitlements.mac.plist --sign Developer ID Application: Pete... dist/mac-arm64/Modelist.app` ditto -c -k --sequesterRsrc --keepParent dist/mac-arm64/Modelist.app dist/mac-arm64/Modelist.zip xcrun notarytool submit dist/mac-arm64/Modelist.zip --apple-id email --password app_specific_pass --team-id team_id --wait Conducting pre-submission checks for Modelist.zip and initiating connection to the Apple notary service... Submission ID receive
Replies
4
Boosts
0
Views
1.2k
Activity
Jan ’25
Auditing code signatures
We are trying to get much more serious about our ability to audit signed code and trace it back to a signing event. We have a signing service that includes a bit of client code that provides a CryptoTokenKit extension to expose the signing certificate to codesign and Xcode. The private keys are held by the signing service and access is strictly controlled. The CTK extension is given a message/digest to sign, and from reading TN 3126, I believe this is representative of the code directory. For an audit trail, we can record some metadata about the signing request, such as Git repository, branch, commit SHA, etc., but the only value linked to the thing being signed is this blob. Later, if we have an app and want to link it back to the signing event, I can't figure out how to find this blob. It's not the CDHash or any other value I see in the output of codesign -d -vvvvvv. is there a way to recreate that blob given a signed artifact?
Replies
5
Boosts
0
Views
612
Activity
Jan ’25
Reply to How to count the number of signed files
[quote='821436022, mariocst, /thread/772549?answerId=821436022#821436022, /profile/mariocst'] We execute the codesign inside a CI pipeline. [/quote] So you want to generate this report at build time on a machine you control? If so, you could do this by parsing the CodeResources file within the signed bundle. See TN3126 Inside Code Signing: Hashes. WARNING Don’t do this on the user’s device. Quoting TN3126 “The structure of a code signature has changed numerous times in the past and may well change again in the future.” However, doing this on your CI machine should be fine because, if it breaks, only you are affected. 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
Jan ’25