升级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");