How to specify app id when upload to iTunesConnect using command line

拈花ヽ惹草 提交于 2019-11-30 15:23:16

After the recent changes of iTunes Connect, you might want to check out my new open source library: https://github.com/KrauseFx/deliver

It will use the iTMSTransporter to upload your app to iTunes Connect.

You can take a look at how the app is uploaded here: https://github.com/KrauseFx/deliver/blob/master/lib/deliver/itunes_transporter.rb

I released a gist to get the identifier of the next app to be published on iTunesConnect: https://gist.github.com/KrauseFx/db0ea9c884465e507602

I couldn't find a way to specify the app you want to upload. At least now there is a way to receive the identifier of the next app to be uploaded.

Basically I use the 'xcrun -sdk iphoneos Validation' command and read its output to determine the identifier.

http://diegopeinador.blogspot.com/2013/10/automatic-app-creation-and-binary-upload.html this article contains the solution, but you have to use iTMSTransporter (Application Loader's command line tool) instead of xcrun Validation.

Basically you need only the last line from the script in the article. I've simplified it by removing params that I don't need, so it looks

/path/to/iTMSTransporter -u "${ITUNESCONNECT_LOGIN}" -p "${ITUNESCONNECT_PASSWORD}" -m upload -v critical -f /path/to/.itmp/or/folder/containing/.itmp

I had solved this another way with xrun before seeing the Transporter solution. Instead of specifying a bundle id to xrun, I try to find out which is the next in queue and just submit that.

So, my script simply does a "test" Validation of a random one of my apps and I capture the output of xcrun. The error message mentions the desired bundle id, so I build and submit that app instead.

If the next in the queue is an update instead of a new app, Validate will not tell you the bundle id, so you have to do a "test" -upload and the output will have :

ReservedBundleIdentifier = "..."

which again tells you which one to build next. To avoid this being slow, have a very small app for the "test" upload.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!