How to change Bundle ID in "Certificates, Identifiers & Profiles" (Edit your App ID Configuration) ?
Which certificate is needed for a free Mac application (.app) ?
The application need only save\restore disk data (no extension, no wifi, no In-App Purchase, etc).
A very simple basic 3 windows application (type math Calculator). Do I need set some "Capabilities" (App Services) ?
General
RSS for tagDemystify code signing and its importance in app development. Get help troubleshooting code signing issues and ensure your app is properly signed for distribution.
Post
Replies
Boosts
Views
Activity
[7268:372225] Failed to create an FPSandboxingURLWrapper for file:///Users/####/Downloads/mod##06-9-19.pdf. Error: Error Domain=NSPOSIXErrorDomain Code=1 "couldn't issue sandbox extension com.apple.app-sandbox.read-write for 'file:///Users/####/Downloads/mod##06-9-19.pdf'
PS- Used ### to hide info
I am facing an error with apple sandbox in my dot NET MAUI project here is the entitlements file
I don't know Why I'm getting the in my understanding with user-selected.read-write it should work
Hi,
I have added associated domains support for our desktop app and it works fine on my machine. But when I deploy it on other machines, it is not launching.
It throws ‘The application ““ can’t be opened” message. It works fine when I install provisioning profile on those machines.
Xcode is not allowing me to code sign the app manually as part of build process. Till now we were dong the same for other apps.
Associated domain need a provisioning profile and I have created one distribution profile and code signed it. Now it works fine only on my machine and not working on other machines. It works only on other machines if I install provisioning profile.
What should be the issue? How do I work this macOS app on other machines without installing provisioning profile?
I'm currently befuddled by the entire signing and certificate process. I don't understand what I need, what the team admin needs to do, or how to go about doing it so that I can build the project.
We've managed to have this working in the past but I guess the system has changed somewhat. Here's what we have going:
A Unity project which hasn't changed from a few years ago. I build the project in unity, open the Xcode project and this:
There's an issue with the Signing and Capabilities.
If I choose automatic setup it shows an error saying that it requires a development team. I had the account admin add my Apple ID to the team so I'm not sure why that's an issue still. Do I need to pay the 99$ to be able to building Xcode?
If I try to do it manually I select the provisioning profile that the account admin sent me and it auto selects the team associated with the provisioning profile I guess but then there's no singing certificate. The error says:
There is no signing certificate "iOS Development" found. No "iOS Development" signing certificate matching team ID "V7D5YBZRMV" with a private key was found.
So, if someone could explain to me like I'm 5 the entire signing and certificate process is and let me know what we're doing wrong with the team/provisioning profile/certificate setup I would be very much appreciative.
Hello,
I am having some trouble with an application accessing and running SQlite database queries.
The error I am getting is (5642) SQLITE_IOERR_SEEK when trying to sqlite_step_stement in the database. See https://www.sqlite.org/rescode.html#ioerr_seek
A bit of background, it is an application in Unreal Engine, and everything was working fine in Unreal Engine 4. The application uses a SQlite database on disk to store and fetch data. This database is saved to the documents folder. (I also tried other folders to see if that would make a difference)
But since switching to a new version of the engine, Unreal Engine 5, in a build I am getting errors when trying to read/write to the database. This only happens in a build .app file.
The only big difference I can find is that in the new engine when making a build the codesigning is already done in the engine. I don't see why those settings would break anything though. It also has an entitlements file, but I also edited it and made sure it has the same entitlements settings as my own scripts that are run afterwards.
I am overwriting the codesigning with our own CI/CD scripts afterwards. The .app file is codesigned, notarized and stapled by that script. Also I use an entitlements file to set certain values.
It doesn't seem to be a code related issue, as everything is working fine when running the application "in editor". But only when creating a final .app build. It doesn't matter if this build is in Debug or Shipping.
My first thought was to try more entitlements settings. But I tried the following and I am still getting the same errors:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.debugger</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.automation.apple-events</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<false/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
I also am thinking that it might be a different issue as the application is able to create a database file in the documents folder, just not able to do the read write inside the database.
These values are just set to try if any of these settings "fix" the issue, but thus far no luck.
As there is nothing I can find in Unreal Engine related forums, and I also do not have a lot of experience with all the options when making Mac builds. I was hoping someone on this forum could think of a reason why a .app file would have problems with reading and writing to a SQlite database.
I have two apps written in MAUI Mac Catalyst Framework -- one is main app, second is app updater. My updater works this way: it is located in the same directory as main app: firstly it deletes MainApp.app/Contents folder, then unzips new Contents folder that was downloaded from server.
I added NSUpdateSecurityPolicy dictionary as in https://developer.apple.com/documentation/bundleresources/information_property_list/nsupdatesecuritypolicy and create application like . It looks that I wrote everything fine
pkgbuild --install-location '/Library/Application Support/First' --root root --ownership preserve # aslo signing, etc
But on user's macOS, system does not allow to delete Contents folder: I have IO_Access denied exception. Can it be because main app is sandboxing or something else?
What I can do wrong? Thanks a lot in advance!
I am not enrolled in the Apple developer program and need to create a small Safari app extension helper that will be shared with my colleagues within the company. Is it somehow possible for me to distribute the app in some way without forcing everyone to disable a gatekeeper?
Hey guys!
Please, its not possible to remove or reuse an identifier (new app by removing the old one) through the developer portal?
https://developer.apple.com/account/resources/identifiers/list
Everytime we try to remove there is a message we can't:
There is a problem with the request entity
The App ID 'xxxxxxxxxxx' appears to be in use by the App Store, so it can not be removed at this time.
But the app has been removed!!!
Does anyone knows how to delete/reuse an identifier by doing some action in the portal?
NOTE: we are low code - no Xcode (yes, so poor)
Thank u guys!
I have two apps that installed by .pkg . They are both signed by Developer Application . One of my apps has purpose of updating another app. It is implemented by deleteting it from folder, and unzipping archive with new .app to it's folder. Even if new app is signed and notarized, has stepled ticket on it, I get error "App is damaged and can't be opened". In Secrity and Confidentiality preferences I have warning that developer is unauthorized, even if this new app is notarized and signed. How can I implement app update to not throw error that app is damaged> Thanks a lot in advance
Hello, I'm create an app using QT on MacOs with Generate to Xcode, when submitting it to the App Store the upload process was successful but I got email feedback with the message containing the following:
ITMS-90238: Invalid Signature - The main app bundle Tren at path Tren.app has following signing error(s): a sealed resource is missing or invalid . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html and Technical Note 2206 at https://developer.apple .com/library/mac/technotes/tn2206/_index.html for more information.
ITMS-90296: App sandbox not enabled - The following executables must include the 'com.apple.security.app-sandbox' entitlement with a Boolean value of true in the entitlements property list: [[Tren.app/Contents/MacOS/Tren ]] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app.
I've done the methods available in the community, but it still doesn't work. I hope someone will provide a solution, thank you
I am having trouble submitting the next build of my macOS app to the App Store Connect. I keep getting a variation of this error:
ITMS-90238: Invalid Signature - The main app bundle MyApp at path MyApp.app has following signing error(s): code has no resources but signature indicates they must be present In subcomponent: MyApp.app/Contents/Frameworks/GoogleAppMeasurement.framework . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html and Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.
ITMS-90238: Invalid Signature - The main app bundle MyApp at path MyApp.app has following signing error(s): code has no resources but signature indicates they must be present In subcomponent: MyApp.app/Contents/Frameworks/GoogleAppMeasurementIdentitySupport.framework . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html and Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.
ITMS-90238: Invalid Signature - The main app bundle MyApp at path MyAppt.app has following signing error(s): code has no resources but signature indicates they must be present In subcomponent: MyApp.app/Contents/Frameworks/FirebaseAnalytics.framework . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html and Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.
I am using Firebase framework as a Swift package. I tried updating Swift package to the latest version and that didn't help. I also tried to revert to the last version that was successfully used on the App Store/TestFlight and that didn't help.
I have no control over this framework other than not use it or choose a specific version.
I also tried to export the app and use the Transporter app and that didn't help.
Any suggestions?
According to the new requirements for binary XCFrameworks they should be code signed. I watched the WWDC23 video 10061-Verify app dependencies with digital signatures and while it helpfully provides the command to sign the framework after building, it doesn’t mention how to sign it when your distribution certificates are of the Cloud managed kind, and therefore not actually in the macOS Keychain.
My question is how can I sign a binary XCFramework when the only distribution certificate we have is in the cloud? I am a part of a team in App Store Connect, if that’s relevant.
Thanks 🙌
In macOS, the App Sandbox is designed to restrict applications' access to system resources and user data, mitigating damage from potential threats. However, I'm unclear on its relationship with permissions and how it effectively reduces such threats.
For example, with com.apple.security.device.camera, it seems to me that NSCameraUsageDescription should suffice. If an application is granted permission via NSCameraUsageDescription, configuring com.apple.security.device.camera still doesn't guarantee protection against malicious access to user data, does it?
Or, if I haven't configured both com.apple.security.device.camera and NSCameraUsageDescription, could a malicious app still somehow prompt the camera permission dialog or bypass permission checks and access the camera without the com.apple.security.device.camera configuration?
I've developed a crypto token kit extension using the Xcode template. I've successfully added the certificate and its corresponding private key to the keychain. However, when attempting to sign with this certificate, I need to call a command-line interface (CLI) that I've created.
The CLI is located at ~/Applications/mycli/cli_executable. My issue arises because the extension is sandboxed, prohibiting direct communication with the CLI. I attempted to remove the sandbox, but that didn't resolve the problem (the extension wasn't being registered without the app sandboxed). Additionally, the CLI relies on a database, so simply copying the file to the app container folder isn't a feasible solution (unless it's a symlink – I'm unsure if this is possible).
How can I effectively address this problem and enable communication between the sandboxed extension and my CLI (GoLang app)?
Thank you.
Is it possible to read messages from chat.db inside a MacOS app?
I'm developing a MacOS app, I'm able to successfully connect to ~/Library/Messages/chat.db but when I try to run a query I get Error preparing select: authorization denied
I know other apps like TablePlus are able to read chat.db but these apps are outside of iOS.
Thanks in advance!
I have an non-appstore application, using developer id which I want to transfer to another developer account.
How can I go about doing this?
How do I transfer the app ID?
Will past versions of that app signed with the old account continue to work? Will I have to re-sign them?
Hi,
We have an app that installs a number of system extensions. According to this documentation the app must be located in the Applications folder to be activated so when the app launches we check that it is running from /Applications (or a subfolder) and if it isn't we inform the user and exit. This has been working fine until a recent submission whereupon installing the app via TestFlight casuses it to be translocated when run and our check to fail. So, a couple of questions:
Is it expected that an app installed via TestFlight (or indeed the AppStore) can be translocated when it is run?
If yes to the above, how can we ensure that out app is running from Applications and can therefore activate its extensions?
Thanks
Alan
I need an OV certificate to code sign an Electron application. I was used to build in Jenkins the application oth for Windows and macOS using Electron-Forge (https://www.electronforge.io/guides/code-signing/code-signing-macos). To be more specific use XCode and Keychain to store the certificate.
Sadly, new certificate industry requirements will force me to use Azure Key Vaults (or other cloud HSM alternatives) to store the certificate.
I need to find a way to code-sign it for macOS from Azure Key Vaults or equivalent solutions.
Thank you
I distribute an application in a zip file from my website. the application needs access to some files next to it to run properly.
The application is correctly signed and notarized and stapled.Of course if I download it from my website, it gets the quarantine attribute.
When I try to open it for the first time, a gatekeeper warning saying that the application comes from the internet, but has been checked by apple and no malware has been detected is displayed. My impression is that the application has been correctly signed and notarized. but If confirm that I wan to open it, the quarantine attribute is not deleted.
spctl -a -v /path/to/Myapp.app
path/to/Myapp.app: accepted
source=Notarized Developer ID
I regularly see folks run into problems with their Developer ID signing identities. Historically I pointed them to my posts on this thread, but I’ve decided to collect these ideas together in one place.
If you have questions or comments, start a new thread here on DevForums and tag it with Developer ID so that I see it.
IMPORTANT Nothing I write here on DevForums is considered official documentation. It’s just my personal ramblings based on hard-won experience. There is a bunch of official documentation that covers the topics I touch on here, including:
Xcode documentation
Xcode Help
Developer Account Help
Developer > Support > Certificates
For a lot more information about code signing, see the Code Signing Resources pinned post.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
The Care and Feeding of Developer ID
Most Apple signing assets are replaceable. For example, if you accidentally lose access to your Apple Development signing identity, it’s a minor inconvenience. Just use the Developer website to revoke your previous certificate and create a replacement. Or have Xcode do that for you.
IMPORTANT If you don’t understand the difference between a certificate and a digital identity, and hence signing identity, read Certificate Signing Requests Explained before reading this post.
Some signing assets are precious. Losing access to such assets has significant consequences.
Foremost amongst those are Developer ID signing identities. These allow you to sign Mac products that ship independently. Anyone with access to your Developer ID signing identity can sign code as you. This has a number of consequences, both for you and for your relationship with Apple.
Identify a Developer ID Signing Identity
A Developer ID signing identity consists of two parts: the certificate and the private key. There are two different flavours, identifiable by the subject name in the certificate:
Developer ID Application — This is named Developer ID Application: TTT, where TTT identifies your team. Use this to sign code and disk images.
Developer ID Installer — This is named Developer ID Installer: TTT, where TTT identifies your team. Use this to sign installer packages.
Note If you do KEXT development, there’s a third flavour, namely a KEXT-enabled Developer ID Application signing identity. For more details, see KEXT Code Signing Problems.
This post focuses on traditional signing identities, where you manage the private key. Xcode Cloud introduced cloud signing, where signing identities are “stored securely in the cloud”. These identities have the Managed suffix in Certificates, Identifiers, and Profiles. For example, Developer ID Application Managed is the cloud signing equivalent of Developer ID Application. To learn more about cloud signing, watch WWDC 2021 Session 10204 Distribute apps in Xcode with cloud signing. To identify these certificates ‘in the wild’, see Identifying a Cloud Managed Signing Certificate.
Limit Access to Developer ID
Anyone with your Developer ID signing identity can sign code as you. Given that, be careful to limit access to these signing identities. This is true both for large organisations and small developers.
In a large organisation, ensure that only folks authorised to ship code on behalf of your organisation have access to your Developer ID signing identities. Most organisations have some sort of release process that they use to build, test, and authorise a release. This often involves a continuous integration (CI) system. Restrict CI access to only those folks involved in the release process.
Even if you’re a small developer with no formal release process, you can still take steps to restrict access to Developer ID signing identities. See Don’t Leak Your Private Key, below.
In all cases, don’t use your Developer ID signing identities for day-to-day development. That’s what Apple Development signing identities are for.
Create Developer ID Signing Identities as the Account Holder
Because Developer ID signing identities are precious, the Developer website will only let the Account Holder create them. For instructions on how to do this, see Developer Account Help > Create certificates > Create Developer ID certificates. For more information about programme roles, see Developer > Support > Program Roles.
IMPORTANT In an Organization team it’s common for the Account Holder to be non-technical. They may need help getting this done. For hints and tips on how to avoid problems while doing this, see Don’t Lose Your Private Key and Don’t Leak Your Private Key, both below.
Limit the Number of Developer ID Signing Identities You Create
Don’t create Developer ID signing identities unnecessarily. Most folks only need to create one. Well, one Developer ID Application and maybe one Developer ID Installer. A large organisation might need more, perhaps one for each sub-unit, but that’s it.
There are two reasons why this is important:
The more you have, the more likely it is for one to get into the wrong hands. Remember that anyone with your Developer ID signing identity can sign code as you.
The Developer website limits you to 5 Developer ID certificates.
Note I can never remember where this limit is actually documented, so here’s the exact quote from this page:
You can create up to five Developer ID Application certificates and up to five Developer ID Installer certificates using either your developer account or Xcode.
Don’t Lose Your Private Key
There are two standard processes for creating a Developer ID signing identity:
Developer website — See Developer Account Help > Create certificates > Create Developer ID certificates.
Xcode — See Xcode Help > Maintaining signing assets > Manage signing certificates.
Both processes implicitly create a private key in your login keychain. This makes it easy to lose your private key. For example:
If you do this on one Mac and then get a new Mac, you might forget to move the private key to the new Mac.
If you’re helping your Organization team’s Account Holder to create a Developer ID signing identity, you might forget to export the private key from their login keychain.
It also makes it easy to accidentally leave a copy of the private key on a machine that doesn’t need it; see Don’t Leak Your Private Key, below, for specific advice on that front.
Every time you create a Developer ID signing identity, it’s a good idea to make an independent backup of it. For advice on how to do that, see Back Up Your Signing Identities, below.
That technique is also useful if you need to copy the signing identity to a continuous integration system.
If you think you’ve lost the private key for a Developer ID signing identity, do a proper search for it. Finding it will save you a bunch of grief. You might be able to find it on your old Mac, in a backup, in a backup for your old Mac, and so on. For instructions on how to extract your private key from a general backup, see Recover a Signing Identity from a Mac Backup.
If you’re absolutely sure that you previous private key is lost, use the Developer website to create a replacement signing identity.
If the Developer website won’t let you create any more because you’ve hit the limit discussed above, talk to Developer Programs Support. Go to Apple > Developer > Contact Us and follow the path Development and Technical > Certificates, Identifiers, and Provisioning Profiles.
Don’t Leak Your Private Key
Anyone with your Developer ID signing identity can sign code as you. Thus, it’s important to take steps to prevent its private key from leaking.
A critical first step is to limit access to your Developer ID signing identities. For advice on that front, see Limit Access to Developer ID, above.
In an Organization team, only the Account Holder can create Developer ID signing identities. When they do this, a copy of the identity’s private key will most likely end up in their login keychain. Once you’ve exported the signing identity, and confirmed that everything is working, make sure to delete that copy of the private key.
Some organisations have specific rules for managing Developer ID signing identities. For example, an organisation might require that the private key be stored in a hardware token, which prevents it from being exported. Setting that up is a bit tricky, but it offers important security benefits.
Even without a hardware token, there are steps you can take to protect your Developer ID signing identity. For example, you might put it in a separate keychain, one with a different password and locking policy than your login keychain. That way signing code for distribution will prompt you to unlock the keychain, which reminds you that this is a significant event and ensures that you don’t do it accidentally.
If you believe that your private key has been compromised, follow the instructions in the Compromised Certificates section of Developer > Support > Certificates.
IMPORTANT Don’t go down this path if you’ve simply lost your private key.
Back Up Your Signing Identities
Given that Developer ID signing identities are precious, consider making an independent backup of them. To back up a signing identity to a PKCS#12 (.p12) file:
Launch Keychain Access.
At the top, select My Certificates.
On the left, select the keychain you use for signing identities. For most folks this is the login keychain.
Select the identity.
Choose File > Export Items.
In the file dialog, select Personal Information Exchange (.p12) in the File Format popup.
Enter a name, navigate to your preferred location, and click Save.
You might be prompted to enter the keychain password. If so, do that and click OK.
You will be prompted to enter a password to protect the identity. Use a strong password and save this securely in a password manager, corporate password store, on a piece of paper in a safe, or whatever.
You might be prompted to enter the keychain password again. If so, do that and click Allow.
The end result is a .p12 file holding your signing identity. Save that file in a secure location, and make sure that you have a way to connect it to the password you saved in step 9.
Remember to backup all your Developer ID signing identities, including the Developer ID Installer one if you created it.
To restore a signing identity from a backup:
Launch Keychain Access.
Choose File > Import Items.
In the open sheet, click Show Options.
Use the Destination Keychain popup to select the target keychain.
Navigate to and select the .p12 file, and then click Open.
Enter the .p12 file’s password and click OK.
If prompted, enter the destination keychain password and click OK.
Alternatively, Xcode has a feature to export and import your developer account, including your Developer ID signing identities. Do this using the action menu in Xcode > Settings > Accounts. For the details, see Xcode Help > Maintaining signing assets > Export signing certificates and provisioning profiles.
Recover a Signing Identity from a Mac Backup
If you didn’t independently backup your Developer ID signing identity, you may still be able to recover it from a general backup of your Mac. To start, work out roughly when you created your Developer ID signing identity:
Download your Developer ID certificate from the Developer website.
In the Finder, Quick Look it.
The Not Valid Before field is the date you’re looking for.
Now it’s time to look in your backups. The exact details depend on the backup software you’re using, but the basic process runs something like this:
Look for a backup taken shortly after the date you determined above.
In that backup, look for the file ~/Library/Keychains/login.keychain.
Recover that to a convenient location, like your desktop. Don’t put it in ~/Library/Keychains because that’ll just confuse things.
Rename it to something unique, like login-YYYY-MM-DD.keychain, where YYYY-MM-DD is the date of the backup.
In Keychain Access, choose File > Add Keychain and, in the resulting standard file panel, choose that .keychain file.
On the left, select login-YYYY-MM-DD.
Chose File > Unlock Keychain “login-YYYY-MM-DD“.
In the resulting password dialog, enter your login password at the date of the backup.
At the top, select My Certificates.
Look through the list of digital identities to find the Developer ID identity you want. If you don’t see the one you’re looking for, see Further Recovery Tips below.
Export it using the process described at the start of Back Up Your Signing Identities.
Once you’re done, remove the keychain from Keychain Access:
On the left, select the login-YYYY-MM-DD keychain.
Choose File > Delete Keychain “login-YYYY-MM-DD”.
In the confirmation alert, click Remove Reference.
The login-YYYY-MM-DD.keychain is now just a file. You can trash it, keep it, whatever, at your discretion.
This process creates a .p12 file. To work with that, import it into your keychain using the process described at the end of Back Up Your Signing Identities.
IMPORTANT Keep that .p12 file as your own independent backup of your signing identity.
Further Recovery Tips
If, in the previous section, you can’t find the Developer ID identity you want, there are a few things you might do:
Look in a different backup.
If your account has more than one keychain, look in your other keychains.
If you have more than one login account, look at the keychains for your other accounts.
If you have more than one Mac, look at the backups for your other Macs.
The login-YYYY-MM-DD keychain might have the private key but not the certificate. Add your Developer ID certificate to that keychain to see if it pairs with a private key.
Revision History
2025-02-20 Added some clarification to the end of Don’t Leak Your Private Key.
2023-10-05 Added the Recover a Signing Identity from a Mac Backup and Further Recovery Tips sections.
2023-06-23 Added a link to Identifying a Cloud Managed Signing Certificate.
2023-06-21 First posted.