The error occurs because the Release configuration defaults to App Store distribution, which requires specific entitlements and certificates. Switching the Deployment Provisioning profile to "Development" or "Ad Hoc" resolves the immediate signing conflict. This allows you to deploy directly to a connected Mac for testing without needing an active App Store Connect subscription.
Understanding the Deployment Configuration
When you build a macOS application in Delphi 12.1 targeting ARM64 (Apple Silicon), the IDE uses different provisioning profiles based on the active build configuration. The Debug configuration typically works out of the box because it uses a local Development certificate tied to your Apple ID. However, the Release configuration is stricter. By default, Delphi often points the Release deployment target toward an App Store distribution profile.
If you do not have an App Store Developer account enrolled, or if your current team does not have the specific "App Store" provisioning profile generated in the Apple Developer Portal, the deployment process fails. The IDE complains about missing or invalid certificates because it cannot find a valid signature that satisfies the App Store requirements. This is a common point of confusion for developers who only need to test their app locally before submitting it to the store.
Locating the Provisioning Settings
To fix this issue, you must manually override the provisioning profile used during the deployment phase. You do not need to change the global project settings permanently; you can adjust these settings specifically for the configuration you are building.
Follow these steps to locate the correct menu path:
- Open your project in the Delphi IDE.
- Navigate to the Project Manager window.
- Right-click on your main project file or the Deployment node within the project tree.
- Select Options from the context menu.
- In the Options dialog, expand the Application category on the left sidebar.
- Click on Deployment.
This area controls how the IDE packages and signs your application when you choose "Run" or "Build" with a remote debugger attached.
Changing the Release Configuration Profile
Once you are in the Deployment options, you will see a dropdown menu labeled
Provisioning. This is the critical setting that determines which certificate and profile the IDE uses to sign your binary.
For local testing on a Mac, you should not use the App Store profile. Instead, follow these actions:
- Ensure the Configuration selector at the top of the Options dialog is set to Release.
- Find the Provisioning dropdown list.
- Change the selection from App Store to Development or Ad Hoc.
- If you do not see these options, ensure you have installed the necessary developer certificates in your macOS Keychain Access utility.
Selecting
Development is usually the safest bet for immediate debugging. It uses the same certificate as your Debug builds but applies the Release optimization settings. If you plan to distribute the app to testers via a direct link (not the App Store), choose
Ad Hoc, provided you have added the target device's UDID to your Apple Developer account.
Verifying Certificate Availability
After changing the provisioning profile, you must ensure that the corresponding certificate exists on your machine. Delphi relies on the macOS keychain to find valid signing identities. If you switched to Ad Hoc but lack the certificate, the build will still fail.
Check your Keychain Access application on your Mac:
- Open Keychain Access.
- Search for Developer ID Application or Mac Developer.
- Verify that the certificate is marked as Valid and has not expired.
If the certificate is missing, go to the Apple Developer Portal, navigate to
Certificates, Identifiers & Profiles, and generate a new one. Download the .cer file and double-click it to install it into your keychain. Once installed, restart the Delphi IDE to refresh its cache of available signing identities.
Testing the Deployment
With the configuration updated, attempt to run your application again. Go to
Run >
Run or press F9. The IDE should now successfully sign the executable using the Development or Ad Hoc profile and deploy it to your Mac.
If you encounter permission errors regarding the microphone or camera, ensure that your app’s Info.plist includes the appropriate usage descriptions. Additionally, verify that your Mac’s Security & Privacy settings allow unsigned apps from identified developers if you are using a non-App Store profile. For more information on handling cross-architecture issues on modern Macs, you might find
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1) useful for understanding broader compatibility layers.
Frequently Asked Questions
Why does Debug work but Release fail?
Debug configurations automatically use your local Development certificate, which is easy to obtain. Release configurations often default to stricter App Store profiles that require specific entitlements and a paid developer account enrollment.
What is the difference between Development and Ad Hoc provisioning?
Development profiles allow installation on up to 100 registered devices and are intended for debugging. Ad Hoc profiles allow installation on any number of registered devices but are intended for beta testing and cannot be used for App Store submission.
Can I submit an app built with a Development profile to the App Store?
No. Apps submitted to the Mac App Store must be signed with an App Store Distribution certificate. Using a Development or Ad Hoc profile will result in rejection during the review process.
Where do I find my Apple ID certificate in Delphi?
Delphi automatically scans your macOS Keychain for valid certificates. You do not import them into Delphi directly; instead, ensure they are installed in your Mac’s Keychain Access app and then select them from the Provisioning dropdown in the Project Options.
Does this issue affect iOS deployments?
Similar provisioning rules apply to iOS, but the menu paths differ slightly under the iOS deployment section. The core concept of switching from App Store to Development profiles for local testing remains the same across platforms.