Build iOS app and distribute .ipa via TestFlight with Jenkins and Xcode 7
Asked Answered
X

4

3

Apple has released Xcode 7 update that broke everything again.

Previously, we had to deal with

ResourceRules.plist: cannot read resources

issue by using a hack described, for example, here. Some people wonder why has this even happened in the first place.

However, with Xcode 7 update they forbade the usage of Code Signing Resource Rules Path by giving this error when this option is set:

ERROR ITMS-90339: "This bundle is invalid. The Info.plist contains an invalid key 'CFBundleResourceSpecification' in bundle

This question is exactly about this issue with an answer proposing to delete this option from build settings. Guess what, after deletion the first error pops up, so we find ourselves in the loop.

My question (apart from how come we've ended up in this mess, of course) is:

How do we fix both problems so iOS building works in Jenkins and Xcode 7 with TestFlight uploading afterwards?

Xylo answered 22/9, 2015 at 15:6 Comment(0)
S
1

Take a look at this: https://mcmap.net/q/281588/-error-itms-90339-this-bundle-is-invalid-the-info-plist-contains-an-invalid-key-39-cfbundleresourcespecification-in-app-bundle

And if you're not sure it's a bug, you can get a confirmation here too: http://cutting.io/posts/packaging-ios-apps-from-the-command-line/

Seigler answered 24/9, 2015 at 19:6 Comment(1)
Thanks, I'll try it! However, it's a dirty hack and hopefully some day we will be able to do it the sane way.Xylo
P
1

As of Xcode 7 we should use xcodebuild instead of PackageApplication to produce the .ipa file.

xcodebuild has a new -exportArchive option to create an .ipa that works more like Xcode Organizer.

See answer here for details: iOS builds / ipa creation no longer works from the command line

Pavid answered 29/9, 2015 at 14:15 Comment(0)
R
1

I fixed the same issue by changing Jenkins build settings: Go to Configure > Advanced Xcode build options and add to Custom xcodebuild arguments

CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist

Retrorse answered 21/10, 2015 at 11:7 Comment(1)
What difference does it make if you pass this to xcodebuild or set it in the project setting / xcconfig? Wouldn't the end result be a CFBundleResourceSpecification entry in the app's info.plist, which is now disallowed by Apple?Security
S
0

These two commands have worked perfectly for me:

  1. Create an archive: xcodebuild -workspace "/path/to/something.xcworkspace" -scheme "some enterprise" -configuration Release -CODE_SIGN_IDENTITY="your identity" PROVISIONING_PROFILE="61xyz111-22x0-2345-123x-xyxxxxxx" archive -archivePath "/where/you/want/the/archive/xyz.xcarchive"

  2. Generate IPA: xcodebuild -exportArchive -exportFormat IPA -exportProvisioningProfile "Name of your profile" -archivePath "/where/you/saved/the/archive/xyz.xcarchive" -exportPath "/where/you/want/the/IPA/xyz.ipa"

Skyway answered 29/9, 2015 at 19:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.