4
votes

I am currently having issues creating an IPA file through the xcode command line tool (xcodebuild and xcrun). I first run the following:

xcodebuild -scheme scheme -sdk iphoneOS6.0 -arch armv7 -configuration config clean build#

where scheme and config is the relevant scheme and configuration

I then run

xcrun -sdk iphoneos PackageApplication -v appPath -o ipaPath -sign codesignature

where appPath and ipaPath are paths to the app and ipa and the codesignature what I am signing the ipa with. I have also tried embedding the provisioning profile

The process produces an ipa file however when I try to drag it into itunes it tells me that it is not a valid IPA. I have also tried this process through ad hoc distribution process via Archive in xcode and managed to create a valid IPA, however as I am trying to automate the process this isn't really what I want.

Any thoughts why the IPA would be invalid?

Thanks

1

1 Answers

0
votes

You've forgotten to --embed your provisioning profile.

I do something like this

xcrun -sdk iphoneos PackageApplication -v -o `pwd`/out.ipa --sign "iPhone Distribution: Company Name (ID)" --embed /path/to/mobileprovision