I'm trying to generate an xcarchive using xcodebuild that I can later export as an .ipa using the new functionality added with Xcode 5.
This works perfectly fine:
xcodebuild -workspace 'MyWorkspace.xcworkspace' -scheme 'MyScheme' -configuration 'Release' -archivePath tmp.xcarchive archive
xcodebuild -exportArchive -exportFormat IPA -archivePath tmp.xcarchive -exportPath app.ipa -exportWithOriginalSigningIdentity
But as soon as I add custom build settings to the archive command:
-derivedDataPath build SYMROOT=build/build.sym DSTROOT=build/build.dst OBJROOT=build/build.obj SHARED_PRECOMPS_DIR=build/build.pch
The .xcarchive generated is empty, but there is no error.
Any ideas?
Application archive created by Xcode, Apple's development IDE for Mac OS X and iOS applications; stores all application files in a format that can be submitted to the App Store for review; contains a digital signature identifying the developer.
Now you have to do below steps: Go to Window->Organiser->Archives Here, select your archive fine and click on "Distribute App" button on right side Then Instead of upload, select Export option, and continue selecting default options, it will end you up with generating ipa file.
Archive your App In Xcode with your project open, select the simulator (button near the top of the window next to your project name, typically named as a specific type of iPhone) – change it to Generic iOS Device. Open the Product menu and choose Archive. You will see the archive information. Click Validate App.
For me, this had to do with the Installation Directory
Deployment Build Setting in Xcode: CMake somehow set this to ""
, i.e. an empty string, when it should have been "/Applications"
, the Xcode default. For me, setting it to anything else than "/Applications"
caused the resulting archive to be empty and therefore 'malformed'.
So maybe your project somehow did not have Installation Directory
set to "/Applications"
, either because of CMake or something else.
To set this using CMake, add this to your target properties:
set_target_properties(${MODULE} PROPERTIES
...
XCODE_ATTRIBUTE_INSTALL_PATH "/Applications"
...
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With