iOS打包常见错误

升级Xcode8.2后,构建失败:

error: /usr/bin/codesign --force --preserve metadata=identifier,entitlements,resource-rules --sign"

Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)! Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!

这是因为在osx10.10以上的系统上,“resource-rules”不再使用。

解决办法:

找到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication,找到并删除红色部分

my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
"--sign", $opt{sign},
"--resource-rules=$destApp/ResourceRules.plist");

posted on 2017-09-11 15:43  dongzee  阅读(575)  评论(0编辑  收藏  举报