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