How to specify app id when upload to iTunesConnect using command line
Asked Answered
P

4

4

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 [email protected] -w password -U

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

security delete-generic-password  -s Xcode:itunesconnect.apple.com -a [email protected]
Polyphyletic answered 19/3, 2014 at 12:5 Comment(1)
hi ! do you have news about this issue ? did you found a way to fix it ? thanks !Icelandic
E
3

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

Elegant answered 26/11, 2014 at 1:15 Comment(0)
E
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.

Elegant answered 2/9, 2014 at 8:51 Comment(1)
This is basically useless now, after the iTC update. You have to use the TMSTransporter instead.Elegant
L
1

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
Levin answered 10/4, 2014 at 12:9 Comment(1)
you are a godsent :) i am struggling with the same problem and trying ti find a way for couple of days. stumbled on this question a hour ago. your answer just popped up. Thank youEvangelical
G
1

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.

Gilroy answered 11/4, 2014 at 20:29 Comment(1)
I published a gist for just that: gist.github.com/KrauseFx/db0ea9c884465e507602Elegant

© 2022 - 2024 — McMap. All rights reserved.