Hello! I'm suddenly having some difficulty debugging a Flutter-based app. When I run an app from VS Code, it launches Xcode and builds & installs the app on an iPhone running 18.1. However, once the app is installed on the phone, it disappears and in Xcode, a dialog appears with:
Failed to install embedded profile for : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)
However, when I look at the provisioning profile being used, it seems to have the correct entitlement:
I've also tried enabling automatic signing (instead of the current manual signing using match), as well as generating an adhoc profile and re-adding the device UDID in developers.apple.com. None of these have worked.
This issue appeared within the past day or so and was working fine yesterday with no code changes, so I've been stumped. All my certs are relatively new and were issued within the past few months. I've tried regenerating the provisioning profiles using match, but this gives the same thing.
What's odd is that I can run the build and upload to testflight, then download and install the app just fine through there. But this obviously makes debugging an issue.
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
I have a macOS application that was previously distributed under my personal Apple Developer account using a Developer ID certificate. We’ve recently transitioned distribution to our company’s Apple Developer account.
The app’s bundle identifier has been successfully transferred, and I’ve signed a new build of the app using the company’s Developer ID certificate. The app installs and runs correctly under the new signature. However, I’ve encountered a problem: the app is no longer able to access previously granted permissions (e.g., Screen Recording, System Audio Recording, and Input Monitoring). Furthermore, it cannot re-prompt for these permissions because they appear as already granted in System Settings.
From what I understand, this issue is due to the change in the code signing identity. Specifically, the designated requirements used by macOS to identify an app have changed, so the system no longer associates the new version of the app with the previously granted permissions (as outlined in Apple's Technical Note TN3127).
The only workaround I’ve found so far is to manually reset the app's permissions using Terminal commands (e.g., tccutil reset), but this is not something we can reasonably ask end users to do.
Question:
Is there a recommended or supported approach to either preserve permissions when changing Developer ID identities, or programmatically trigger a permissions reset for existing users? We're looking for a seamless solution that doesn't degrade user experience.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
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.
I have tried again and again to generate and install the .mobileprovision on my device for testing apps following the exact instructions. I cannot get this to work. When I tap the .mobileprovision on the device I get the error "Profile Error - This profile cannot be installed."
In Xcode in the console as I try to install the profile, this is what it shows:
`profiled (ManagedConfiguration)
Desc : Invalid Profile
US Desc: Invalid Profile
Domain : MCProfileErrorDomain
Code : 1000
Type : MCFatalError
and then
profiled
Desc : Invalid Profile
Sugg : Invalid Profile
US Desc: Invalid Profile
US Sugg: Invalid Profile
Domain : MCInstallationErrorDomain
Code : 4000
Type : MCFatalError
...Underlying error:
NSError:
Desc : Invalid Profile
US Desc: Invalid Profile
Domain : MCProfileErrorDomain
Code : 1000
Type : MCFatalError
I have been at this for days and cannot get it to work. Any help would be appreciated
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
We are developing an application for MAC machine using .NET. After developing and signing the package in notarization process was failed with the error in the attached file.
Then we have created the simple Xamarin.MAC to check whether able to notarize it . But with the simple project also we have faced the same error.
Provide us the solution to fix these issues
We have tried to codesiginin the app to resolve the notarization error, but while code signing the below error was thrown
"unable to build chain to self-signed root for signer "Developer ID Application" (not mentioning the certificate id)
SFSecure.app: errSecInternalComponent"
Notarization-error
Topic:
Code Signing
SubTopic:
Notarization
Once I have built my macOS .app and signed it I run notarytool using this simple shell script:
#!/bin/sh
ditto -c -k --keepParent "$1.app" "$1.zip"
xcrun notarytool submit "$1.zip" --keychain-profile "Notary Profile for DeepSkyStacker" --wait
xcrun stapler staple $1.app
rm -f $1.zip
How can I export that "keychain-profile" (notary profile) so I can use it in CI/CD actions? Clearly I don't wish to expose the full invocation of xcrun notarytool store-credentials.
Topic:
Code Signing
SubTopic:
Notarization
Hello Apple Developer Support,
We are experiencing an issue when programmatically installing a trusted root certificate on EC2 macOS instances (ARM-based), running the latest version of macOS 14.7.5 (Build 23H527).
We are using the following command as part of our automated setup process:
sudo security authorizationdb write com.apple.trust-settings.admin allow
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$CERT_NAME"
sudo security authorizationdb remove com.apple.trust-settings.admin
This fails with the following message:
SecTrustSettingsSetTrustSettings: The authorization was denied since no user interaction was possible
In the past, as sugested in other posts (https://developer.apple.com/forums/thread/671582) we were able to bypass this issue by running:
sudo security authorizationdb write com.apple.trust-settings.admin allow
This worked successfully in prior versions, including earlier 14.x releases, and continues to work on Intel-based macOS instances.
However, in macOS 14.7.5 (on ARM), this approach no longer works.
We suspect this may be due to a change in how System Integrity Protection (SIP) is enforced, especially on EC2 ARM.
Questions:
Has Apple introduced any changes in macOS 14.7.5 that prevent modifying trust settings via security CLI on headless or non-interactive sessions?
Is there an approved or documented way to install system-level trusted certificates programmatically on macOS 14.7.5 (ARM)?
Are there alternatives for setting trustRoot certs in non-GUI environments, such as virtualized or cloud-hosted macOS instances?
As further information we were thinking to use MDM Profiles but looks like it is also blocked
Thanks
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
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.
Hello, our app is non-sandboxed app, but we do want to support widget extension and safari extension. Those extensions require sandboxing. Is it possible to do this without sandboxing our app? Thank you!
I am trying to code sign an application which relies on many python libraries to run. For background knowledge, the .app was created with a —onefile command on Visual Studio.
I code signed my application itself using
codesign --deep --force --verify --timestamp --sign "Developer ID Application: Issey Yohannes (GL5BCCW69X)" /Users/isseyyohannes/Desktop/Automated\ ALGORA.app
However, when I try to run the application the error shows in terminal as follows
[PYI-16345:ERROR] Failed to load Python shared library '/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python': dlopen: dlopen(/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python, 10): no suitable image found. Did find:
/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python: code signature in (/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python: stat() failed with errno=1
Through some external tools, I was able to narrow the issue as follows
Hardened Runtime Restriction: Your application is attempting to load a shared library (Python) at runtime, but the library is either: Not properly signed with the same Team ID as your app. Not marked as a valid platform binary. macOS requires all loaded libraries to comply with its code-signing and runtime security policies.
Any insight is much appreciated.
Topic:
Code Signing
SubTopic:
General
Hi,
I'm getting error 65 upon stapling and I am suspecting that non-default trust settings may be the reason as outlined here:
Unfortunately whatever I do, I can't seem to reset the trust settings to their default values (removing the blue/white "+"), I'm not being asked for credentials upon closing the certificate window. I have also tried to unlock the System Roots key chain, to no avail.
Also, when running
security dump-trust-settings -d
I get
Number of trust settings : 0
for all certificates.
Any ideas as to what I may be doing wrong? Is there any other setting that may be involved?
Thanks!
Topic:
Code Signing
SubTopic:
Notarization
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
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$
Hello Apple Developer Community,
I’m encountering an issue where my macOS app (signed with a valid ‘Developer ID Application’ certificate and accepted by Apple’s notary service) fails when I attempt to staple the notarization ticket. The Apple notary service reports ‘Accepted’ each time, but xcrun stapler staple always returns Error 65, with the local check (spctl -a -vvv) showing ‘Unnotarized Developer ID.’
Here are some key points:
Certificate: I have a valid ‘Developer ID Application’ certificate (unexpired) in my login and system keychains, with Apple’s intermediate certificates also installed and set to System Defaults or Always Trust.
Notarization: Regardless of whether I submit a .zip of the .app or the final .dmg for notarization, notarytool reports ‘Accepted.’
Stapling: xcrun stapler staple (or notarytool staple) on the exact file I uploaded fails with Error 65, claiming it can’t validate the downloaded ticket.
Environment Checks:
Checked for duplicate or outdated certificates—only one Developer ID remains.
Repeated on multiple code-signed builds (both .app and .dmg) with the same result.
Manually tested code-signing the .app with entitlements (for the hardened runtime) and then signing the .dmg without entitlements.
Logs: The relevant excerpt from stapler indicates “Could not validate ticket for [app]. The staple and validate action failed! Error 65,” even though Apple’s notary service claims success.
Could you please advise any additional troubleshooting steps or possible causes for local validation failure after a successful notarization? I’ve already ensured the environment is up to date with valid intermediates, only one Developer ID certificate. Any insight on diagnosing ticket mismatch or known tool bugs with Error 65 would be appreciated.
Thank you!
Topic:
Code Signing
SubTopic:
Notarization
Doing it multiple times (even hours apart) doesn't help.
createdDate: 2025-03-14T13:58:40.397Z
id: eb49f8a4-bee6-432b-87de-6b11ca9d392a
name: panda-app-1.0.0-arm64.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-03-14T13:23:31.444Z
id: f6f3c938-5356-434c-aba1-c425f18cb4a7
name: panda-app-1.0.0-arm64.dmg
status: In Progress
Topic:
Code Signing
SubTopic:
Notarization
Hello everyone.
I have a simple doubt, I receive an email informing that the Apple Distribution certificate will expire.
I create one new in the Developer portal with one year duration.
My doubt is, I need to do something more like open again the app in Xcode, insert new certificate and build it again, send to apple and everything?
Or just creating this certification is enough?
Is possible to increase this certification time or auto renew?
Thank you!!!
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Hi, I am working on a personal HIDDriverKit project. The documentation suggests that you do not need the entitlements from Apple to do local development - that all you need to do is turn of SIP, enable developer mode, and turn signing to "Sign to Run Locally".
However, I have followed all of these steps, and am still running into the error that to build, I need to have a provisioning profile with the DriverKit (development) feature (MacOS 15.2 Xcode 16.2).
Am I missing something here regarding the steps for local development? Does one need to request a development version of the entitlements even for local development? Do I need a paid developer account to do this?
Thank-you in advance.
My command line tool with a JIT entitlement is failing to run on Sequoia.
2025-05-26 14:17:09.758 E taskgated-helper[91764:3ab7036] [com.apple.ManagedClient:ProvisioningProfiles] Disallowing DecisionRuleTool because no eligible provisioning profiles found
2025-05-26 14:17:09.758 Df amfid[576:3ab6d6b] /Users/jim/DecisionRuleTool not valid: Error Domain=AppleMobileFileIntegrityError Code=-413 "No matching profile found" UserInfo={NSURL=file:///Users/jim/DecisionRuleTool, NSLocalizedDescription=No matching profile found}
2025-05-26 14:17:09.759 Df kernel[0:3ab7031] (AppleMobileFileIntegrity) AMFI: When validating /Users/jim/DecisionRuleTool:
2025-05-26 14:17:09.759 Df kernel[0:3ab7031] mac_vnode_check_signature: /Users/jim/DecisionRuleTool: code signature validation failed fatally: When validating /Users/jim/DecisionRuleTool:
2025-05-26 14:17:09.759 Df kernel[0:3ab7031] proc 91763: load code signature error 4 for file "DecisionRuleTool"
2025-05-26 14:17:09.759 Df kernel[0:3ab7032] (AppleSystemPolicy) ASP: Security policy would not allow process: 91763, /Users/jim/DecisionRuleTool
Codesign isn't giving me any clues as to why. It validates.
Asking it what the entitlements are on the binary:
% codesign --display --entitlements - /Users/joconnor/MACEP-9852-2/tools/detection/DecisionRuleTool
Executable=/Users/jim/DecisionRuleTool
[Dict]
[Key] com.apple.application-identifier
[Value]
[String] XXXXXXXXX.com.mycompany.drt
[Key] com.apple.developer.team-identifier
[Value]
[String] XXXXXXXXX
[Key] com.apple.security.cs.allow-jit
[Value]
[Bool] true
https://developer.apple.com/documentation/Xcode/signing-a-daemon-with-a-restricted-entitlement
This makes it look like this may be hopeless, that I can't create a command line took with proper entitlements.
Topic:
Code Signing
SubTopic:
Entitlements
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
Hi at all, we started a notarization process and after 3 hours is still in progress.