I have a project with multiple targets that are all for different iOS Apps. For instance one traget for the lite version and another one for the pro version.
I want to build and archive all of my Apps at once. Currently I have a scheme for every target which I use to archive each app independently. But now I have to start the archiving, wait until it is done and then start the next one.
Is there a way to archive all apps with one single action in xcode 4 or using the command line?
The Build action in a scheme dictates what targets are built for what actions. Leave the defaults (so they'll all be built for the Archive action). When that scheme is active, it'll build all the requested targets just prior to archiving when you select Product -> Archive.
You could create a new scheme called "All", edit it, then in its Build action, add all targets you want to archive. Then just select that scheme and ask it to archive.
Alternatively, add all targets to your existing scheme and uncheck unwanted actions for which it should build those extra targets, leaving only Archive.
You can use xcodebuild
from the commandline
e.x.
xcodebuild -configuration Release -project MyProject -scheme MyProjectScheme clean build
Also you can use xcrun
to build an ipa from the commandline as well, see:
https://stackoverflow.com/a/4198166/618419
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