I have several iPhone apps, and I've set out to do away with as much of the clicking around on iTunes connect that I have to do. One thing that I'd like to do is be able to upload an ipa to iTunes connect through the command line.
How To Perform iOS App Validation From the Command Line
This post suggests
xcrun -sdk iphoneos Validation -online -upload /path/to/ipa
Which almost works, but will fail validation because it tries to hit the first app in iTunes connect, which has a different bundle identifier than the one I'm uploading. So I tried it without validaiton (remove the -online
flag)
xcrun -sdk iphoneos Validation -upload /path/to/ipa
and the still complains about the bundle identifier being separate from the first app available in iTunes connect. Is there a way to pass a bundle, or app's Apple ID, or something into the xcrun
command to specify an app other than the first one in iTunes Connect? There's go to be a way, and I've tried to get the console output from xCode during an archive/upload action by spawning xCode from the terminal, but it doesn't give me useful information.
The Apple way to do it is application loader tool: altool --upload-app -f file -u username [-p password] [--output-format xml]
As described here: https://help.apple.com/itc/apploader/#/apdATD1E53-D1E1A1303-D1E53A1126
In case you are still looking for a good solution, check out deliver, an open source library to automate the submission of your app: https://github.com/KrauseFx/deliver
It will use the iTunes transporter under the hood. You can check out the source code of the actual upload here: https://github.com/KrauseFx/deliver/blob/master/lib/deliver/itunes_transporter.rb
来源:https://stackoverflow.com/questions/16409109/distribute-ipa-to-itunes-connect-from-command-line