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

妖精的绣舞 提交于 2020-01-21 03:37:06

问题


Summary

I`m trying to automatize my applications upload to iTunesConnect.

I have at least 6 apps and all are always "ready to upload".

The problem is when I try to upload an app to iTunesConnect using command line, I have the following error message:

"warning: There are more that one application pre-configured in iTunesConnect. Only the first will be used.".

Questions

  • How can I know what is the first?
  • Is there a way to set the first?
  • Is there a way to specify which app I am trying to submit? How I am doing it?

Build Script...

xcodebuild -target $TARGETNAME -configuration Release -sdk iphoneos clean build "CODE_SIGN_IDENTITY=iPhone Distribution: XXXXX..." "PROVISIONING_PROFILE=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"

xcrun -sdk iphoneos PackageApplication -v $CURRENTDIR/build/Release-iphoneos/$TARGETNAME.app -o $CURRENTDIR/Dist/$TARGETNAME.ipa --sign "iPhone Distribution: XXXXX..." --embed "path/to/XXXXX.mobileprovision"

Upload Script...

security add-generic-password -s Xcode:itunesconnect.apple.com -a user@email.com -w password -U

xcrun -sdk iphoneos Validation -verbose -online -upload ./Dist/$TARGETNAME.ipa

security delete-generic-password  -s Xcode:itunesconnect.apple.com -a user@email.com

回答1:


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




回答2:


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.




回答3:


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



回答4:


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.



来源:https://stackoverflow.com/questions/22505299/how-to-specify-app-id-when-upload-to-itunesconnect-using-command-line

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