Distribute ipa to iTunes connect from command line
Asked Answered
R

2

4

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.

Ridotto answered 6/5, 2013 at 23:56 Comment(8)
@Marker i am facing the same problem..did you get any closer to the solutionUppercase
@Uppercase what I'm currently doing is, I keep all of my apps out of the "ready to upload" state, and then when I want to upload something I toggle it so that it's the only one. I never found a way to specify an app.Ridotto
@Marker ohh thats sad.. i have almost 20 apps to upload in a queue and i want to completely automate the processUppercase
@Uppercase it's unfortunate, but you could build a web scraper to go and click the "ready to upload binary" button for you like we did :)Ridotto
I've been considering open-sourcing ours, but it has a lot of business-specific logic tied into it right now. I'll let you know if I ever do!Ridotto
@MarKer cool...i m really looking forward for thatUppercase
sorry to bring up a old post, but has someone a solution directly from command line and not doing a script for clicking on "ready to upload" ?Hygeia
I've just answered a similar question here: https://mcmap.net/q/911233/-how-to-specify-app-id-when-upload-to-itunesconnect-using-command-lineWillianwillie
W
3

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

Wahoo answered 23/6, 2016 at 10:52 Comment(1)
OK another way to do it is with transporter API: help.apple.com/itc/transporteruserguide/en.lproj/…Wahoo
C
0

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

Cloutman answered 26/11, 2014 at 1:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.