MAC OS程序的签名问题

如果出现如下错误:

not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

则:

  • Option 1 Disable checking on code-signing for libsProject Settings > Signing & Capabilities > Hardened Runtime > Runtime Exceptions > Diable Library Validation
  • Option 2: Code-sign libs using your code-signing identity, e.g. Apple Development: Your Name (10-char-ID)
    • Remove public signature: codesign --remove-signature /path/to/theirlib.dylib
    • Sign with project signature: codesign -s "Apple Development: Your Name (10-char-ID)" /path/to/theirlib.dylib
  • 可能需要把签名改为:
  • Code Sign Identity: Mac Developer

你可能感兴趣的:(macos)