xcodemacos

How to re-sign a macOS app with a different certificate after the app is built?


I need to re-sign a macOS app I have already built and signed. Is this possible? I need to be able to sign it with my client's certificates rather than my employers.


Solution

  • This is done with codesign. On their system, assuming their certificate is in their keychain, then can use codesign -f -s <identity> <path>. The -f option indicates that previous signatures should be replaced.

    codesign -f -s - --timestamp=none --all-architectures --deep /path/to.app