Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Notarization is a security process implemented by Apple to ensure that macOS applications are free from malicious code. This process involves submitting your app to Apple for automated security checks. Once notarized, macOS can verify that the app is safe to run, which is essential for distributing apps outside the Mac App Store. This article will guide you through the steps to notarize your macOS application.
Before you begin the notarization process, ensure you have the following:
First, ensure your app is properly signed with your Developer ID certificate. You can do this using Xcode or the codesign
command.
Example:
codesign --deep --force --verify --verbose --sign "Developer ID Application: Your Name (Team ID)" /path/to/your/app.app
Apple requires that you submit your app as a ZIP file or a disk image (DMG). Here’s how to create a ZIP file:
Example:
cd /path/to/your/app
zip -r MyApp.zip MyApp.app
Use the altool
command to submit your app for notarization. You will need your Apple Developer credentials.
Example:
xcrun altool --notarize-app --primary-bundle-id "com.yourcompany.yourapp" --username "your-apple-id@example.com" --password "@keychain:AC_PASSWORD" --file /path/to/MyApp.zip
Note: You can store your Apple ID password in the keychain and reference it using @keychain:AC_PASSWORD
.
After submitting, you’ll receive a RequestUUID. Use this UUID to check the status of your notarization request.
Example:
xcrun altool --notarization-info <RequestUUID> --username "your-apple-id@example.com" --password "@keychain:AC_PASSWORD"
Once your app is successfully notarized, you need to staple the notarization ticket to your app. This ensures that the notarization information is included with your app.
Example:
xcrun stapler staple /path/to/your/app.app
Finally, verify that the stapling was successful.
Example:
xcrun stapler validate /path/to/your/app.app
Notarizing your macOS application is a crucial step in ensuring its security and compatibility with macOS. By following the steps outlined in this guide, you can successfully notarize your app and provide a safer experience for your users.