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.

Community
  • 1
  • 1
marklar
  • 502
  • 7
  • 21
  • @Marker i am facing the same problem..did you get any closer to the solution – Yadnesh Sep 27 '13 at 13:58
  • @Yadnesh 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. – marklar Sep 27 '13 at 15:00
  • @Marker ohh thats sad.. i have almost 20 apps to upload in a queue and i want to completely automate the process – Yadnesh Sep 30 '13 at 09:20
  • @Yadnesh 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 :) – marklar Oct 02 '13 at 19:50
  • 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! – marklar Oct 03 '13 at 16:06
  • @MarKer cool...i m really looking forward for that – Yadnesh Oct 04 '13 at 09:11
  • 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" ? – John Smith Nov 20 '13 at 09:19
  • I've just answered a similar question here: http://stackoverflow.com/a/22987614/1971301 – kambala Apr 10 '14 at 12:13

2 Answers2

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

Moran77
  • 119
  • 8
  • OK another way to do it is with transporter API: https://help.apple.com/itc/transporteruserguide/en.lproj/static.html#apdATD1E1288-D1E1A1303-D1E1288A1126 – Moran77 Jul 28 '21 at 06:13
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

KrauseFx
  • 11,551
  • 7
  • 46
  • 53