How to upload to App Store from command line with Xcode 11?

不打扰是莪最后的温柔 提交于 2019-12-03 08:02:14

问题


Previously, with Xcode 10, we were using altool to upload to App Store:

ALTOOL="/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool"
"$ALTOOL" --upload-app --file "$IPA_PATH" --username "$APP_STORE_USERNAME" --password @keychain:"Application Loader: $APP_STORE_USERNAME"

But with Xcode 11, "Application Loader.app" doesn't exist anymore, as part of the Xcode 11 changes:

Xcode supports uploading apps from the Organizer window or from the command line with xcodebuild or xcrun altool. Application Loader is no longer included with Xcode. (29008875)

So how do we upload from command line to TestFlight or App Store now?


回答1:


With Xcode 11 as command line tools, to validate or upload an ipa, replace altool with xcrun altool:

xcrun altool --validate-app --file "$IPA_PATH" --username "$APP_STORE_USERNAME" --password @keychain:"Application Loader: $APP_STORE_USERNAME"

xcrun altool --upload-app --file "$IPA_PATH" --username "$APP_STORE_USERNAME" --password @keychain:"Application Loader: $APP_STORE_USERNAME"

Get more help with xcrun altool --help.




回答2:


Use command line tools,

xcrun altool --upload-app -f path -u username -p password

If your apple account use TWO-FACTOR Authentication , your password would be wrong , you need to go to https://appleid.apple.com/account/manage "Security - Generate Password" to get the password

If you get other wrong , you could add --verbose to print detail errors log, just like

xcrun altool --upload-app -f path -u username -p password --verbose

And , get more help with xcrun altool --help




回答3:


You can now also use a new app from Apple called "Transporter" that is a replacement for Xcode application loader.



来源:https://stackoverflow.com/questions/56436345/how-to-upload-to-app-store-from-command-line-with-xcode-11

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