Manage signing assets separately
Keep signing assets with the project
Flutter, React Native, and Unity use different build tools, but the same steps apply to handling certificates and private keys.
Import only what you need
Import only the signing certificates and provisioning profiles required for the current project. Store certificates and their associated private keys in the macOS Keychain. Don't leave exported files containing private keys in your Downloads folder.
Protect exportable signing backups with a strong passphrase, and store the passphrase separately. Use signing assets only after confirming client authorization.
Limit build permissions
Create dedicated credentials for automated builds and restrict them to the required projects and actions. Don't grant a build job lasting, full team access just to complete one Archive.
When injecting environment variables, avoid printing their values to logs. Before sharing troubleshooting screenshots, hide tokens, sensitive parts of connection addresses, and certificate passwords.
Remove temporary credentials
First confirm that your signing backup works. Then remove unneeded certificates and associated private keys from Keychain, and delete temporary provisioning profiles, exported copies, and sensitive values in build scripts.
Check shell history, logs, temporary directories, and Trash. Revoke or rotate any tokens that were exposed or are no longer within their intended scope, using the issuing service.