修复 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"。

图片
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容