Search results for

“codesign”

3,223 results found

Post

Replies

Boosts

Views

Activity

Why is my notarized and signed macOS .app rejected by Gatekeeper during installation?
I'm trying to distribute my macOS application (a .dmg file) to customers, and I've followed all the steps to sign and notarize the application. However, when I try to install the .dmg containing the app, Gatekeeper rejects it with the error AppName cannot be opened because developer is not verified. Even though I’ve signed the app with my Developer ID, notarized it, and verified the signature using codesign, I am still encountering issues when attempting to install or open the app on a clean macOS environment. Here’s the error I see when using spctl to check the .dmg: spctl --assess --type open --verbose=4 output/App.dmg output/App.dmg: rejected source=Insufficient Context When trying: spctl -a -t open -vvv --context context:primary-signature output/App.dmg output/Unbounded.dmg: accepted source=Notarized Developer ID origin=Developer ID Application: My .app is signed and notarised by electron builder and I explicitly signed and notarised dmg too but still not working
3
0
650
Nov ’24
Reply to "How to" for dext distribution
That failed in the automatic process, though - it kept bringing in the old dext bundle ID, and it was only AFTER involving the Team Agent and registering a new dext bundle ID that I got the correct results So, the issue here is that automatic works by having Xcode modify the portal, so if you're account type can't modify the portal configuration, Xcode can't fix it. You can fix this in two ways: You can have the Team Agent log in to Xcode and configure the project, which will then cause Xcode to modify the portal. You can modify the portal configuration yourself so that it's configuration matches what it should. This is ultimately a business decision, but my personal experience has been that out development flow works MUCH better with admin accounts. With a large company (which obviously has concerns about legitimate app distribution), my own inclination would be to have two different accounts- a development account where all developers could be admins but which never actually shipped software and a company a
Nov ’24
Reply to "How to" for dext distribution
Hi Kevin, First, thank you for your patience on all of this. It turns out you can't do that from an Admin role. I kept looking at the output of the security command and seeing the older bundle ID showing up for com.apple.developer.driverkit.userclient-access., which was not the updated bundle ID I was developing now. FYI, this is one of the pitfalls of manual codesigning, as automatic codesigning will not allow that. That's actually the biggest issue with manual codesigning- it allows you to force configuration that won't actually work, so unless you understand EXACTLY why automatic is failing, you can easily end up replacing an error at signing with a different error somewhere else. That's the issue, though. I don't know EXACTLY why automatic codesigning is failing - at least with manual code signing I can look at what settings I am using and try something else. If I just press automatic and it doesn't work (it hasn't yet), there does not seem to be anything further I can
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
You're right, I'm not using XCode for development. I know why this issue didn't occur, and I hope it can be helpful for those who come across this blog in the future. But now I have encountered another problem and need your help The following entitlement is not set in my entitlement. plist file: The reason for this issue is that when using @ electron/osx sign for signing, some parameters in the old option were invalid, resulting in the execution of the default entitlement. plist file in the node_module package. But now, I have encountered a new problem and I hope you can help me take a look: When I submitted a new binary file for review, I received a response saying that the software could not be opened, and other phenomena included: Before I signed the app, it could run normally, but after I signed it, I found that the app package could no longer run. I submitted the version to Apple Connect, but even after downloading it through TestFlight, I couldn't open it. Even if I turn off sandbox mode in the entities
Nov ’24
Xcode Build for React App fails in codesigning step
I tried building the React App for Any iOS device (Arm64) but I get error. Although I can build successfully for any iOS Simulators In the codesigning step I get the following error, Warning: unable to build chain to self-signed root for signer Apple Development: my email address ( ... ) I don't have paid membership of Apple Developer Program, does that cause this failure? Also, to archive also do I need Apple Developer Program paid membership?
Topic: Code Signing SubTopic: General
1
0
478
Nov ’24
Reply to codesign use of Cloud-managed Developer ID
[quote='768573021, fraapaul, /thread/768573, /profile/fraapaul'] Is it correct that codesign only uses certificates from the local Keychain … ? [/quote] Correct. If you use the Xcode organiser to export a Developer ID signed app [1], you can look at Packaging.log to see how this works. codesign is used to generate the data to be signed and then to apply the signature, but the actual signing is done using a web service. AFAIK all of this is considered an implementation detail and not documented for third-party use (other than via Xcode and xcodebuild, of course). Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] You have to remove your Developer ID signing identity from the keychain in order to get cloud signing. I have mine in a separate keychain — I talk about that more in The Care and Feeding of Developer ID — so I just removed that keychain from the search list in Keychain Access.
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
[quote='813976022, dongkeqiang, /thread/768361?answerId=813976022#813976022, /profile/dongkeqiang'] Amazing, it worked. [/quote] Yay! [quote='813976022, dongkeqiang, /thread/768361?answerId=813976022#813976022, /profile/dongkeqiang'] But now I have encountered another problem and need your help The following entitlement is not set in my entitlement. plist file: [/quote] My understanding is that you’re not using Xcode to sign and package your app. Given that, there’s a limit to how much I can help you with. Your third-party tooling is probably based on Apple’s low-level tools, xcodebuild (perhaps), Clang, codesign, and so on. Those tools don’t add entitlement claims spontaneously. They only do that if you instruct them to. So you have two choices: Seek help from the support channel for the tools you’re using. Or take ownership of the tool, and work through the steps that it takes to create your package to see where it’s adding these entitlement claims. If you get to a point where you see an Apple tool
Nov ’24
SMAppService re-register after app upgrade
I was experimenting with Service Management API and Xcode project from https://developer.apple.com/documentation/servicemanagement/updating-your-app-package-installer-to-use-the-new-service-management-api and faced some issues with the API. I replaced agent with XPC service and tried to re-register it. Use case is a new app package installation with a newer service binary. In order to get the running service restarted with the new binary it's required to unregister old version and register new one. Otherwise the old version would be still running after app upgrade. The problem is that register fails with Operation not permitted error after running unregister which seems to work fine. Experiments with some delays (500ms) between unregister and register seem to help but it's a not a good solution to work around the problem. I'm using open func unregister() async throws with description: The completion handler will be invoked after the running process has been killed if successful or will be invoked whenever an
4
0
1k
Nov ’24
codesign use of Cloud-managed Developer ID
My non-cloud Developer ID certificate will expire soon, and my account also has a cloud-managed Developer ID Certificate. My Mac application build workflow uses Archiving, so the cloud cert should be fine for that. But my workflow also signs bundled apps, such as Sparkle framwork's Autodupate app, using the codesign tool. Is it correct that codesign only uses certificates from the local Keychain, and so cannot use a Cloud-managed Developer ID certificate? Before I manually renew the non-cloud Developer ID certificate, I want to make sure I'm not missing some easier method. Thanks.
1
0
569
Nov ’24
Reply to Notarizing a DMG bundling a complete Perl environment
Building a notarized Perl app on a Mac using the command line? You're kind of fighting the whole world at once there, eh? 😄 In addition to the hardened runtime, you'll need some entitlements to relax said hardened runtime. Put those in an XML file and use the --entitlements flag with codesign. Make sure to completely test your installation with all kinds of funky edge cases. In addition to all the up-front notarization checks, there are certain checks that happen only at runtime, or only at runtime when you try to trigger something like dynamic loading or JIT execution. That is the part that trips up most people in your situation who get that far. I don't know which entitlements Perl will require - most likely all of them.
Nov ’24
Reply to Unable to Write Files Within App Bundle After Codesigning and Notarization
Dear Engineer, Thanks for your information. Actually, We use Qt to develop an application on the macOS platform, and we are attempting to perform code signing and notarization to ensure our the application is trusted by Apple. However, there are a few things that seem weird regarding your statement: App bundles are read-only by design. Let me provide more details for your reference. Currently, when our application starts, it needs to create folder (e.g. Temp) in the root directory of the executable For example: Myapp.app/Contents/MacOS/Myapp ---> Myapp.app/Contents/MacOS/Temp The folder is designed for storing runtime logs or config files for our application. In the past, users may also modify the settings inside target folder if needed. However, the strange thing is that after the application is codesigned and notarized. When we double-click the application Myapp (a.k.a Myapp.app) in Finder, it could successfully launch and create the Temp folder inside the Myapp.app/Contents/MacOS folder. Howeve
Topic: Code Signing SubTopic: General Tags:
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
I tried using a third-party app (Pacivist) to open the app in pkg, nd export the app locally,then followed your instructions to perform the following actions: 1、 Run codesign against the results app to confirm that its signature is valid: % codesign --verify -vvv /path/to/your.app The results obtained: PS:I noticed an error message IFlytek heard. app: a sealed resource is missing or invalid File missing:/Users/pploo2/Desktop/icon/1/iFlytek heard. app/Contents/Resources/tj_S1/_MACOSX/ node_modules I don't know if this is the key to the problem ITMS-90926. 2. Run codesign again to check that you have App Sandbox enabled: % codesign --display --entitlements - /path/to/your.app The results obtained: You can see that there is sandbox=true here Now back to the first step, I performed operations on the app before packaging it as pkg and found that there were no missing related issues
Nov ’24
Reply to AppleScript Code Signing Error
Hi DTS Engineer, thank you for the reply. Unfortunately, some of this is over my head. All I want to do is be able to sign a simple AppleScript app so that I can avoid the recurring security prompts that appear when it tries to copy a folder from the local desktop to a network share. I mean, I tried following the link you provided. I ran the security find-identity -p codesigning command and the results show that 1 identities found and 1 valid identities found. I then tried running the command to code sign the MyTrue app and the reply I got was, Warning: unable to build chain to self-signed root for signer MyTrue: errSecInternalComponent I have downloaded and installed all available intermediate certificates, set my cert to always trust, set the corresponding intermediate to always trust and still no luck. Additional info: my cert will be used to sign a few AppleScript apps for use on a few internal computers without any kind of external distribution. Maybe I am not creating the right kind of certifi
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
First things first, the TestFlight issue (ITMS-90886) is covered by TestFlight, Provisioning Profiles, and the Mac App Store. Regarding the App Sandbox issue (ITMS-90296), there’s a variety of potential causes for this. I recommend that you check whether App Sandbox is actually enabled on the binary that you submitted to App Store Connect. To do that: Locate the installer package (.pkg) you submitted. Unpack that. I usually do this with a third-party app (Pacifist), but Unpacking Apple Archives explains how to do it the hard way. Run codesign against the resulting app to confirm that its signature is valid: % codesign --verify -vvv /path/to/your.app Run codesign again to check that you have App Sandbox enabled: % codesign --display --entitlements - /path/to/your.app I’d expect to see output like this: % codesign --display --entitlements - /Applications/PCalc.app … [Dict] … [Key] com.apple.security.app-sandbox [Value] [Bool] true … Share and Enjoy — Quinn “The Eskim
Nov ’24
Reply to errSecInternalComponent when trying to codesign an app through SSH
Thanks for sharing. For those reading along at home, I discuss this topic in some detail in Resolving errSecInternalComponent errors during code signing. Oh, and one last thing. You wrote: [quote='813469022, roy-bei, /thread/768354?answerId=813469022#813469022, /profile/roy-bei'] codesign -vvv --deep … [/quote] Be careful when using --deep. It’s fine to use when verifying, as you’re doing here, but don’t use it when signing. See --deep Considered Harmful for more on that. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Nov ’24
Why is my notarized and signed macOS .app rejected by Gatekeeper during installation?
I'm trying to distribute my macOS application (a .dmg file) to customers, and I've followed all the steps to sign and notarize the application. However, when I try to install the .dmg containing the app, Gatekeeper rejects it with the error AppName cannot be opened because developer is not verified. Even though I’ve signed the app with my Developer ID, notarized it, and verified the signature using codesign, I am still encountering issues when attempting to install or open the app on a clean macOS environment. Here’s the error I see when using spctl to check the .dmg: spctl --assess --type open --verbose=4 output/App.dmg output/App.dmg: rejected source=Insufficient Context When trying: spctl -a -t open -vvv --context context:primary-signature output/App.dmg output/Unbounded.dmg: accepted source=Notarized Developer ID origin=Developer ID Application: My .app is signed and notarised by electron builder and I explicitly signed and notarised dmg too but still not working
Replies
3
Boosts
0
Views
650
Activity
Nov ’24
Reply to "How to" for dext distribution
That failed in the automatic process, though - it kept bringing in the old dext bundle ID, and it was only AFTER involving the Team Agent and registering a new dext bundle ID that I got the correct results So, the issue here is that automatic works by having Xcode modify the portal, so if you're account type can't modify the portal configuration, Xcode can't fix it. You can fix this in two ways: You can have the Team Agent log in to Xcode and configure the project, which will then cause Xcode to modify the portal. You can modify the portal configuration yourself so that it's configuration matches what it should. This is ultimately a business decision, but my personal experience has been that out development flow works MUCH better with admin accounts. With a large company (which obviously has concerns about legitimate app distribution), my own inclination would be to have two different accounts- a development account where all developers could be admins but which never actually shipped software and a company a
Replies
Boosts
Views
Activity
Nov ’24
Reply to "How to" for dext distribution
Hi Kevin, First, thank you for your patience on all of this. It turns out you can't do that from an Admin role. I kept looking at the output of the security command and seeing the older bundle ID showing up for com.apple.developer.driverkit.userclient-access., which was not the updated bundle ID I was developing now. FYI, this is one of the pitfalls of manual codesigning, as automatic codesigning will not allow that. That's actually the biggest issue with manual codesigning- it allows you to force configuration that won't actually work, so unless you understand EXACTLY why automatic is failing, you can easily end up replacing an error at signing with a different error somewhere else. That's the issue, though. I don't know EXACTLY why automatic codesigning is failing - at least with manual code signing I can look at what settings I am using and try something else. If I just press automatic and it doesn't work (it hasn't yet), there does not seem to be anything further I can
Replies
Boosts
Views
Activity
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
You're right, I'm not using XCode for development. I know why this issue didn't occur, and I hope it can be helpful for those who come across this blog in the future. But now I have encountered another problem and need your help The following entitlement is not set in my entitlement. plist file: The reason for this issue is that when using @ electron/osx sign for signing, some parameters in the old option were invalid, resulting in the execution of the default entitlement. plist file in the node_module package. But now, I have encountered a new problem and I hope you can help me take a look: When I submitted a new binary file for review, I received a response saying that the software could not be opened, and other phenomena included: Before I signed the app, it could run normally, but after I signed it, I found that the app package could no longer run. I submitted the version to Apple Connect, but even after downloading it through TestFlight, I couldn't open it. Even if I turn off sandbox mode in the entities
Replies
Boosts
Views
Activity
Nov ’24
Xcode Build for React App fails in codesigning step
I tried building the React App for Any iOS device (Arm64) but I get error. Although I can build successfully for any iOS Simulators In the codesigning step I get the following error, Warning: unable to build chain to self-signed root for signer Apple Development: my email address ( ... ) I don't have paid membership of Apple Developer Program, does that cause this failure? Also, to archive also do I need Apple Developer Program paid membership?
Topic: Code Signing SubTopic: General
Replies
1
Boosts
0
Views
478
Activity
Nov ’24
Reply to codesign use of Cloud-managed Developer ID
[quote='768573021, fraapaul, /thread/768573, /profile/fraapaul'] Is it correct that codesign only uses certificates from the local Keychain … ? [/quote] Correct. If you use the Xcode organiser to export a Developer ID signed app [1], you can look at Packaging.log to see how this works. codesign is used to generate the data to be signed and then to apply the signature, but the actual signing is done using a web service. AFAIK all of this is considered an implementation detail and not documented for third-party use (other than via Xcode and xcodebuild, of course). Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] You have to remove your Developer ID signing identity from the keychain in order to get cloud signing. I have mine in a separate keychain — I talk about that more in The Care and Feeding of Developer ID — so I just removed that keychain from the search list in Keychain Access.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
[quote='813976022, dongkeqiang, /thread/768361?answerId=813976022#813976022, /profile/dongkeqiang'] Amazing, it worked. [/quote] Yay! [quote='813976022, dongkeqiang, /thread/768361?answerId=813976022#813976022, /profile/dongkeqiang'] But now I have encountered another problem and need your help The following entitlement is not set in my entitlement. plist file: [/quote] My understanding is that you’re not using Xcode to sign and package your app. Given that, there’s a limit to how much I can help you with. Your third-party tooling is probably based on Apple’s low-level tools, xcodebuild (perhaps), Clang, codesign, and so on. Those tools don’t add entitlement claims spontaneously. They only do that if you instruct them to. So you have two choices: Seek help from the support channel for the tools you’re using. Or take ownership of the tool, and work through the steps that it takes to create your package to see where it’s adding these entitlement claims. If you get to a point where you see an Apple tool
Replies
Boosts
Views
Activity
Nov ’24
SMAppService re-register after app upgrade
I was experimenting with Service Management API and Xcode project from https://developer.apple.com/documentation/servicemanagement/updating-your-app-package-installer-to-use-the-new-service-management-api and faced some issues with the API. I replaced agent with XPC service and tried to re-register it. Use case is a new app package installation with a newer service binary. In order to get the running service restarted with the new binary it's required to unregister old version and register new one. Otherwise the old version would be still running after app upgrade. The problem is that register fails with Operation not permitted error after running unregister which seems to work fine. Experiments with some delays (500ms) between unregister and register seem to help but it's a not a good solution to work around the problem. I'm using open func unregister() async throws with description: The completion handler will be invoked after the running process has been killed if successful or will be invoked whenever an
Replies
4
Boosts
0
Views
1k
Activity
Nov ’24
codesign use of Cloud-managed Developer ID
My non-cloud Developer ID certificate will expire soon, and my account also has a cloud-managed Developer ID Certificate. My Mac application build workflow uses Archiving, so the cloud cert should be fine for that. But my workflow also signs bundled apps, such as Sparkle framwork's Autodupate app, using the codesign tool. Is it correct that codesign only uses certificates from the local Keychain, and so cannot use a Cloud-managed Developer ID certificate? Before I manually renew the non-cloud Developer ID certificate, I want to make sure I'm not missing some easier method. Thanks.
Replies
1
Boosts
0
Views
569
Activity
Nov ’24
Reply to Notarizing a DMG bundling a complete Perl environment
Building a notarized Perl app on a Mac using the command line? You're kind of fighting the whole world at once there, eh? 😄 In addition to the hardened runtime, you'll need some entitlements to relax said hardened runtime. Put those in an XML file and use the --entitlements flag with codesign. Make sure to completely test your installation with all kinds of funky edge cases. In addition to all the up-front notarization checks, there are certain checks that happen only at runtime, or only at runtime when you try to trigger something like dynamic loading or JIT execution. That is the part that trips up most people in your situation who get that far. I don't know which entitlements Perl will require - most likely all of them.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Unable to Write Files Within App Bundle After Codesigning and Notarization
Dear Engineer, Thanks for your information. Actually, We use Qt to develop an application on the macOS platform, and we are attempting to perform code signing and notarization to ensure our the application is trusted by Apple. However, there are a few things that seem weird regarding your statement: App bundles are read-only by design. Let me provide more details for your reference. Currently, when our application starts, it needs to create folder (e.g. Temp) in the root directory of the executable For example: Myapp.app/Contents/MacOS/Myapp ---> Myapp.app/Contents/MacOS/Temp The folder is designed for storing runtime logs or config files for our application. In the past, users may also modify the settings inside target folder if needed. However, the strange thing is that after the application is codesigned and notarized. When we double-click the application Myapp (a.k.a Myapp.app) in Finder, it could successfully launch and create the Temp folder inside the Myapp.app/Contents/MacOS folder. Howeve
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
I tried using a third-party app (Pacivist) to open the app in pkg, nd export the app locally,then followed your instructions to perform the following actions: 1、 Run codesign against the results app to confirm that its signature is valid: % codesign --verify -vvv /path/to/your.app The results obtained: PS:I noticed an error message IFlytek heard. app: a sealed resource is missing or invalid File missing:/Users/pploo2/Desktop/icon/1/iFlytek heard. app/Contents/Resources/tj_S1/_MACOSX/ node_modules I don't know if this is the key to the problem ITMS-90926. 2. Run codesign again to check that you have App Sandbox enabled: % codesign --display --entitlements - /path/to/your.app The results obtained: You can see that there is sandbox=true here Now back to the first step, I performed operations on the app before packaging it as pkg and found that there were no missing related issues
Replies
Boosts
Views
Activity
Nov ’24
Reply to AppleScript Code Signing Error
Hi DTS Engineer, thank you for the reply. Unfortunately, some of this is over my head. All I want to do is be able to sign a simple AppleScript app so that I can avoid the recurring security prompts that appear when it tries to copy a folder from the local desktop to a network share. I mean, I tried following the link you provided. I ran the security find-identity -p codesigning command and the results show that 1 identities found and 1 valid identities found. I then tried running the command to code sign the MyTrue app and the reply I got was, Warning: unable to build chain to self-signed root for signer MyTrue: errSecInternalComponent I have downloaded and installed all available intermediate certificates, set my cert to always trust, set the corresponding intermediate to always trust and still no luck. Additional info: my cert will be used to sign a few AppleScript apps for use on a few internal computers without any kind of external distribution. Maybe I am not creating the right kind of certifi
Replies
Boosts
Views
Activity
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
First things first, the TestFlight issue (ITMS-90886) is covered by TestFlight, Provisioning Profiles, and the Mac App Store. Regarding the App Sandbox issue (ITMS-90296), there’s a variety of potential causes for this. I recommend that you check whether App Sandbox is actually enabled on the binary that you submitted to App Store Connect. To do that: Locate the installer package (.pkg) you submitted. Unpack that. I usually do this with a third-party app (Pacifist), but Unpacking Apple Archives explains how to do it the hard way. Run codesign against the resulting app to confirm that its signature is valid: % codesign --verify -vvv /path/to/your.app Run codesign again to check that you have App Sandbox enabled: % codesign --display --entitlements - /path/to/your.app I’d expect to see output like this: % codesign --display --entitlements - /Applications/PCalc.app … [Dict] … [Key] com.apple.security.app-sandbox [Value] [Bool] true … Share and Enjoy — Quinn “The Eskim
Replies
Boosts
Views
Activity
Nov ’24
Reply to errSecInternalComponent when trying to codesign an app through SSH
Thanks for sharing. For those reading along at home, I discuss this topic in some detail in Resolving errSecInternalComponent errors during code signing. Oh, and one last thing. You wrote: [quote='813469022, roy-bei, /thread/768354?answerId=813469022#813469022, /profile/roy-bei'] codesign -vvv --deep … [/quote] Be careful when using --deep. It’s fine to use when verifying, as you’re doing here, but don’t use it when signing. See --deep Considered Harmful for more on that. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Nov ’24