Hi,
I've code-signed my app and notarized it, and created a DMG, and when I slacked it or airdropped it to someone for testing the FIRST time they open it, they get a warning that it was Slacked or airdropped to them and do they want to open it. if they say yes everything is fine. So looking through here someone said I need to sign the app and then make a dmg and sign the dmg and then send that for notorization and then staple that. So I did, and I still get a warning the first tie someone try's to run it.
What am I doing wrong? I know I can buy software and not get a warning from apple. so how do I get my app to work correctly like that?
Demystify code signing and its importance in app development. Get help troubleshooting code signing issues and ensure your app is properly signed for distribution.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi at all, we started a notarization process and after 3 hours is still in progress.
My Developer ID certificate will expire in few days, so I downloaded and installed new certificate in login keychain. However my key is still linked to my old certificate. I have my .p12 but even if I delete the old certificate from login keychain and reinstall the .12 file, my old certificate reappears in the login keychain.
I tried to select the new certificate in the login keychain and choose Files > Export Items (in Keychain Access) but in the Save dialog under File Format the "Personal Information Exchange (.p12)" option is grayed out. How can I generate a key/.p12 file that will be linked to my new certificate?
Trying to play around with Secure Enclave Protected keychain operations in a Tauri-based MacOS app and running into issues.
After much digging and trial and error, here is my understanding and where I'm at:
To access these keychain related APIs, the app must be codesigned, and have the following entitlements:
<key>com.apple.application-identifier</key>
<string>XXXXXXXXXX.com.myorg.myapp</string>
<key>com.apple.developer.team-identifier</key>
<string>XXXXXXXXXX</string>
<key>keychain-access-groups</key>
<array>
<string>XXXXXXXXXX.*</string>
</array>
Currently using a Development cert, generated from Xcode, not a paid account
I had to install the intermediate cert from https://www.apple.com/certificateauthority/
XXXXXXXXXX is the "Team ID", which can be found on my Development cert under Details > "Organizational Unit"
If I build the app and run it (without signing) I get code 34018
If I sign the app and try to run it, I am no longer able to boot it, with error:
The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x12a60a130 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}
Not quite sure what is missing - any help is much appreciated.
To learn how to develop/distribute a DriverKit driver (DEXT) and a UserClient app correctly, I am trying to run the following sample dext and app.
https://developer.apple.com/documentation/driverkit/communicating-between-a-driverkit-extension-and-a-client-app?language=objc
I walked throught steps in README.md included in the project and faced issues.
First, I referred the "Configure the Sample Code Project" section in the README.md and configured the sample code project to build with automatic signing.
I could run the app and activate the dext successfully and made sure the app could communicate with the dext.
Next, I tried the manual signing.
I followed steps described in the "Configure the Sample Code Project" section carefully.
The following entitlements has already been assigned to my team account.
DriverKit Allow Any UserClient Access
DriverKit USB Transport - VendorID
DriverKit
I could build both app and dext and could run the app.
However, when I clicked the "Install Dext" button to activate the dext, I got the following error:
sysex didFailWithError: extension category returned error
Am I missing something?
I would also like to know detailed steps to publicly distribute my dext and app using our Developer ID Application Certificate, as README.md only shows how to configure the project for development.
Xcode version: 16.3 (16E140)
Development OS: macOS 15.5 (24F74)
Target OS: macOS 15.5 (24F74)
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Entitlements
Provisioning Profiles
DriverKit
There is something wrong with my keychain. Can someone point me in the right direction?
codesign --force --sign "Developer ID Application: Denis Putnam (2368694WQF)" --options runtime "/Users/denisputnam/git/expense_tracker/dist/ExpenseTracker.app"
/Users/denisputnam/git/expense_tracker/dist/ExpenseTracker.app: replacing existing signature
Warning: unable to build chain to self-signed root for signer "Developer ID Application: Denis Putnam (2368694WQF)"
/Users/denisputnam/git/expense_tracker/dist/ExpenseTracker.app: errSecInternalComponent
Deniss-MacBook-Pro:expense_tracker denisputnam$
security find-certificate -c "Developer ID Certification Authority" -p /Library/Keychains/System.keychain | openssl x509 -noout -dates
notBefore=Sep 22 18:55:10 2021 GMT
notAfter=Sep 17 00:00:00 2031 GMT
Deniss-MacBook-Pro:expense_tracker denisputnam$
How do I replace an Apple Developer ID Certificate that indicates it is not trusted?
When I look at my Certificate Expiring 02-20-2025, I see a valid status displayed. (See annotation #1.)
However, when I look at my Apple Developer ID Certificate renewal, I see the words not trusted. (See annotation #2.)
I downloaded the renewal certificate and double double-clicked the downloaded item to place it in my KeyChain. This certificate period is from 01-21-2025 to 01-22-2030.
QUESTIONS
Why does the renewal certificate say "certificate is not trusted"? (Its period is 01-21-2025 to 01-22-2030. Today is 01-27-2025.)
How did the renewal certificate get damaged?
What must I do to get the damaged certificate replaced with a valid one?
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Signing Certificates
Developer ID
Hello,
In our Account we have an iOS app with an explicit identifier "ABC123.com.some.app" that is using non-team prefix which is DEF456. It has also explicit identifiers for Widgets bundle and Notification Service.
Due to non-team prefix, it can't access e.g. shared keychain and data put there by our other apps. Since we are working on features that require these capabilities, we would like to update the app identifier, so it is prefixed with our team id DEF456.
Initially, we thought that the process would require steps like:
Create new app, team-prefixed identifier(s) for app and all things that need them
Recreate the provisioning profiles with new App Identifier
Roll out the app using with new profiles via App Store
but when trying to create the new identifier with com.some.app and team id prefix DEF456 we are getting following error:
An App ID with Identifier com.some.app is not available. Please enter a different string.
Can anybody advise us how to correctly perform such change and what steps are required from our end?
We would like to keep our existing App Store entry, ratings and smoothly switch users. We are aware that this kind of migration results in loss of Keychain access.
Thanks for any advice on that!
I have local LLM application, the backend is in python and frontend is in electron.js , all complied in a .pkg file or .dmg file
I have created the valid certifcates for notarization
But it fails everytime, I have attached the logs
steps I followed
Created a certificate all steps related to getting it setup,
ran productsign command on pkg file
ran codesign for dmg
xcruntool submit command
If anyone has any idea on how proceed
codesigningdmg (2).txt
code-singingpkg.txt
Topic:
Code Signing
SubTopic:
Notarization
I want to run a nap. I'm developing on my actual iPhone previously. I have been able to do this but the phone is now missing from two computers. It appears in devices and simulators on both machines.
In XCode I create and export a notarized app for "direct distribution". I then create a tar file of the exported .app to distribute to my users. Until today this worked fine. Now when the users try to run the app it pops up a dialog saying "app is damaged and can't be opened. You should move it to the Trash." It is possible to ctrl-click on the app and force it to run but, I think, whether this works or not will depend on system settings and not all users have root access to modify settings. Even simply copying the .app folder from the command line will cause this error.
Hi Developers,
I'm encountering persistent validation errors in Xcode 16.3 (16E140) on macOS 15.4.1 (24E263) with M1 when archiving and distributing a macOS app (Developer ID signing + notarization).
App Structure:
A native Swift/Obj-C wrapper app that launches a nested .app inside its Resources.
The nested app is built with PyInstaller and includes:
A Python core
Custom C++ binaries
Many bundled .so libraries (e.g., from OpenCV, PyQt/PySide)
Issues During Validation:
App Sandbox Not Enabled
Error: App Sandbox missing for NestedApp.app/Contents/MacOS/NestedExecutable.
Question: For Developer ID (not App Store), is sandboxing strictly required for nested PyInstaller apps? If the wrapper is sandboxed, must the nested app be as well? Given the PyInstaller app's nature (requiring broad system access), how should entitlements be managed?
Upload Symbols Failed
Errors for missing .dSYM files for:
The nested app’s executable
Custom C++ binaries
.so files (OpenCV, PyQt, etc.)
These are either third-party or built without DWARF data, making .dSYM generation impractical post-build.
Question: Are these symbol errors critical for Developer ID notarization (not App Store)? Can notarization succeed despite them? Is lack of symbol upload a known limitation with PyInstaller apps? Any best practices?
So I just updated Xcode to 16.3 and updated a project to its recommended build settings which includes "Register App Groups".
So I have an outside Mac App Store app that uses app groups. Here we have an action extension. I can't debug it, can't get it to run. Nothing useful in Xcode is displayed when I try... but it looks like a code signing issue when I run and have Console open.
So I try to make a provisioning profile manually and set it...didn't work. I noticed now though in signing & capabilities the group id is in red...like it's invalid, or something?
This was a "macOS styled" group without the "group." prefix. So am I supposed to switch it to have the group. prefix? It makes the red text go away (no warnings or anything about app groups here, just red text).
So if I change it to group. prefix..does that make an entire new container?What happens on app update for installs that don't have group. prefix? Does the system transparently migrate the group? Or Am I supposed to migrate the entire group container to the identifier with group. prefix?
Also how does this affect running on older version of macOS? If I go with the "group." prefix to make the red text go away,.. what happens on macOS 11.0? Got a little more than I bargained for here after midnight.
Hi the best community! When I try to submit the app to Testflight I receive the following error:
"codesign command failed (/var/folders/j9/yh_rkh114rbgvmglf4gycj8w0000gn/T/XcodeDistPipeline.~~~OW0Dwk/Root/Payload/Application.app/Frameworks/Alamofire.framework: replacing existing signature
/var/folders/j9/yh_rkh114rbgvmglf4gycj8w0000gn/T/XcodeDistPipeline.~~~OW0Dwk/Root/Payload/Application.app/Frameworks/Alamofire.framework: invalid or corrupted code requirement(s)
Requirement syntax error(s):
line 1:155: unexpected token: NPH
)"
I have never stuck with this issue before.
Xcode Version 16.0
I assume that there is something related to code signing and our company name in App Store connect: Medical Institution “NPH” (The company name has been anonymized for privacy purposes.)
Appreciate any help.
Thank you!
I developed a macOS application and have already signed the pkg package. However, when I submitted it for notarization using the following command:
xcrun notarytool submit --signed.pkg --apple-id "**@gmail.com" --team-id "2*******M" --password "this is password" --wait
I received a "Rejected" status. The log provided the following details:
"logFormatVersion": 1,
"jobId": "f5f3751d-b449-4a2f-b905-32d38ab5963b",
"status": "Rejected",
"statusSummary": "Team is not yet configured for notarization. Please contact Developer Programs Support at developer.apple.com under the topic Development and Technical / Other Development or Technical Questions.",
"statusCode": 7000,
"archiveFilename": "*********.pkg",
"uploadDate": "2025-03-20T03:16:43.651Z",
"sha256": "3ca39700c531a66571721424a6c00668748011174b4ae20bbbec5c2d3a8a41f9",
"ticketContents": null,
"issues": null```
Can you help me, thank you.
Topic:
Code Signing
SubTopic:
Notarization
I have created a XPC server and client using C APIs. I want to ensure that I trust the client, so I want to have a codesigning requirement on the server side, something like -
xpc_connection_set_peer_code_signing_requirement(listener, "anchor apple generic and certificate leaf[subject.OU] = \"1234567\"")
This checks if the client code was signed by a code-signing-identity issued by Apple and that the teamID in the leaf certificate is 1234567.
My questions are-
Is using teamID as a signing requirement enough? What else can I add to this requirement to make it more secure?
How does xpc_connection_set_peer_code_signing_requirement work internally? Does it do any cryptographic operations to verify the clients signature or does it simply do string matching on the teamID?
Is there a way actually verify the clients signature(cryptographically) before establishing a connection with the server? (so we know the client is who he claims to be)
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
XPC
Signing Certificates
Code Signing
After signing and notarizing our application, the entitlement “com.apple.security.get-task-allow” is removed. However, we want this entitlement to remain and we want to be able to create a corefile when needed.
Is it possible to make the “com.apple.security.get-task-allow” entitlement persistent after signing and notarizing, so that our application can create a corefile?
Topic:
Code Signing
SubTopic:
Entitlements
Hi,
I recently created and installed new code signing certificates/keys on my main Mac.
How to easily copy these certificates/keys to my another Mac with the same Apple ID?
Earlier Quinn suggested:
"The easiest way to do this is use Xcode’s import/export feature. Launch Xcode, choose Xcode > Settings, select Accounts, select the account in question, then choose Export Apple ID and Code Signing Assets from the action (…) menu."
And it worked fine in 2020-2021. However import/export options are no longer available in XCode 16 anymore.
Please suggest a simple solution.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Hey everyone,
I've been trying to notarize my Electron macOS app for the past two days without any success. My longest attempt took nearly 4 hours, and my current attempt has already been running for 2 hours and 26 minutes.
From what I can see in the logs, the signing step has completed successfully, and the app is currently in the notarization stage. But it's been stuck there with no real updates or progress indicators.
Is this kind of delay normal?
Has anyone else experienced such long notarization times?
Any help or insight would be greatly appreciated!
Thanks in advance.
Topic:
Code Signing
SubTopic:
Notarization
Hello. I have an enterprise application that requires specific privileges to execute correctly on MacOS. One of these privileges is SystemPolicyAllFiles (aka Full Disk Access), as we use the endpoint security framework.
When we distribute our application, we generate:
A signed, notarized pkg consisting of our application binaries.
An MDM-compatible .mobileconfig, which contains the SystemPolicyAllFiles setting.
We expect our users to install both to get the application to function correctly.
However, we have three environments we deploy to: Internal (local development on a developer's workstation), "development" (where features are integrated prior to release) and "production" (what our customers get).
For local, our developers create an Apple account and use a Mac Development certificate for signing. They also generate their own embedded.provisionprofile and drop that into their local installation config. For development/production, we use our Developer ID certificate and Developer Installer certificate, with an endpoint security embedded.provisionprofile bound to those.
However, when we generate a .mobileconfig, we need to include a CodeRequirement (CR) for SystemPolicyAllFiles. I've been retrieving this using codesign -dr - ... (i.e., the designated requirement aka DR). However, the designated requirement is very specific to the certificate, which is problematic specifically for local development, where each developer has their own Mac Development certificate.
Here's what the relevant section of our generated mobileconfig looks like right now:
<dict>
<key>SystemPolicyAllFiles</key>
<array>
<dict>
<key>Allowed</key>
<true/>
<key>CodeRequirement</key>
<string>identifier "com.example.app and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = <TEAMID></string>
<key>Comment</key>
<string>app</string>
<key>Identifier</key>
<string>com.exmple.app</string>
<key>IdentifierType</key>
<string>bundleID</string>
<key>StaticCode</key>
<false/>
</dict>
</array>
</dict>
That's in a format that works for our Developer ID cert, but the DR for the Mac Development certificate looks like:
identifier "com.example.app" and anchor apple generic and certificate leaf[subject.CN] = "Mac Developer: John Doe (12ABC34567)" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */
Question: Is it possible to relax the code requirement so that it is generic enough to cover all Mac Developer certificates and Developer ID certificates we use? If not, is there a way to have one code requirement for our Mac Developer certificates and a separate CR for our Developer ID certificate?
My use case is deploying a static "local" .mobileconfig using our internal company MDM (Apple Business Essentials) to all developer workstations so we don't have to have each developer manually configure their system for the software to run.
Thanks!
D