I tried to build *.IPA file with Xcode 7, Jenkins and its plugin Xcode integration. But received error:
### Codesigning '/Users/jenkins/Library/MobileDevice/Provisioning Profiles/' with 'iPhone Developer'
+ /usr/bin/codesign –force –preserve-metadata=identifier,entitlements,resource-rules –sign iPhone Developer –resource-rules=/var/folders/6x/jsvfjlx97_g95jy3l3hlwh900000gq/T/pUGWucQNqO/Payload/MYAPP.app/ResourceRules.plist /var/folders/6x/jsvfjlx97_g95jy3l3hlwh900000gq/T/pUGWucQNqO/Payload/MYAPP.app
Program /usr/bin/codesign returned 1 : [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!
/var/folders/6x/jsvfjlx97_g95jy3l3hlwh900000gq/T/pUGWucQNqO/Payload/MYAPP.app/ResourceRules.plist: cannot read resources
]
error: /usr/bin/codesign –force –preserve-metadata=identifier,entitlements,resource-rules –sign iPhone Developer –resource-rules=/var/folders/6x/jsvfjlx97_g95jy3l3hlwh900000gq/T/pUGWucQNqO/Payload/MYAPP.app/ResourceRules.plist /var/folders/6x/jsvfjlx97_g95jy3l3hlwh900000gq/T/pUGWucQNqO/Payload/MYAPP.app failed with error 1. Output: 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!
/var/folders/6x/jsvfjlx97_g95jy3l3hlwh900000gq/T/pUGWucQNqO/Payload/MYAPP.app/ResourceRules.plist: cannot read resources
Failed to build /var/jenkins/workspace/iOS-ipa/build/MYAPP.ipa
Build step 'Xcode' marked build as failure
Finished: FAILURE
My solution:
The following patch for PackageApplications fixed it for me, I removed resource-rules as it says it's deprecated on 10.10.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
% diff PackageApplication PackageApplicationFixed
155,157c155,156
< my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
< "--sign", $opt{sign},
< "--resource-rules=$destApp/ResourceRules.plist");
---
> my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements",
> "--sign", $opt{sign});
Stay tuned!
Leave a Reply