修复 mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?

修复 mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?

出现问题 not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?
not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?

在 Xcode 11 中应用首选项目设置后,在运行时加载库时可能会遇到以下错误:

dyld: Library not loaded: @rpath/DCOAboutWindow.framework/Versions/A/DCOAboutWindow
  Referenced from: /Users/username/Library/Developer/Xcode/DerivedData/Pipvid-adwfbkaurzovizgaarwkmugeihce/Build/Products/Debug/Pipvid.app/Contents/MacOS/Pipvid
  Reason: no suitable image found.  Did find:
    /Users/username/Library/Developer/Xcode/DerivedData/Pipvid-adwfbkaurzovizgaarwkmugeihce/Build/Products/Debug/Pipvid.app/Contents/MacOS/../Frameworks/DCOAboutWindow.framework/Versions/A/DCOAboutWindow: code signature in (/Users/username/Library/Developer/Xcode/DerivedData/Pipvid-adwfbkaurzovizgaarwkmugeihce/Build/Products/Debug/Pipvid.app/Contents/MacOS/../Frameworks/DCOAboutWindow.framework/Versions/A/DCOAboutWindow) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)

该问题是由 project.pbxproj 中指定签名身份的新条目引起的:CODE_SIGN_IDENTITY = "-";。默认情况下,它设置为签名以在本地运行。
在项目设置中的 Signing Capabilities 下将 Signing Certificate 更改为 Development 可以解决此问题。您也可以手动将条目更新为 CODE_SIGN_IDENTITY = "Apple Development"。

图片

你可能感兴趣的:(修复 mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)