jenkins 构建项目的时候报错:
error 1. Output: Warning: usage of –preserve-metadata with option “resource-rules” (deprecated in Mac OS X >= 10.10)!
报错原因:
是因为Xcode自带的打包插件PackageApplication在Mac OS X >= 10.10的时候,不支持ResourceRules.plist的重签名打包了。
解决方案:
移除PackageApplication中resource-rules相关的定义。
具体操作如下:
(1)第一步
找到PackageApplication。
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication
(2)第二步
移除resource-rules和”–resource-rules=$destApp/ResourceRules.plist”。
移除前
- my @codesign_args = (“/usr/bin/codesign”, “–force”, “–preserve-metadata=identifier,entitlements,resource-rules”,
- “–sign”, optsign,−“–resource−rules=destApp/ResourceRules.plist”);
移除后
+ my @codesign_args = (“/usr/bin/codesign”, “–force”, “–preserve-metadata=identifier,entitlements”,
+ “–sign”, $opt{sign});
最后重新jenkins打包,就不会出现error 1. Output: Warning: usage of –preserve-metadata with option “resource-rules” (deprecated in Mac OS X >= 10.10)!
参考资料:http://cutting.io/posts/packaging-ios-apps-from-the-command-line/