如何使用 Xcode 11 从命令行上传到 App Store?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/56436345/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to upload to App Store from command line with Xcode 11?
提问by C?ur
Previously, with Xcode 10, we were using altool
to upload to App Store:
以前,使用 Xcode 10,我们使用altool
上传到 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 11 中,“Application Loader.app”不再存在,作为Xcode 11 更改的一部分:
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)
Xcode 支持从管理器窗口或从命令行使用 xcodebuild 或 xcrun altool 上传应用程序。Application Loader 不再包含在 Xcode 中。(29008875)
So how do we upload from command line to TestFlight or App Store now?
那么我们现在如何从命令行上传到 TestFlight 或 App Store?
回答by C?ur
With Xcode 11 as command line tools, to validate or upload an ipa, replace altool
with xcrun altool
:
使用 Xcode 11 作为命令行工具,验证或上传 ipa,替换altool
为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
.
获得更多帮助xcrun altool --help
。
回答by forgot2015
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
如果您的苹果账户使用了双因素认证,您的密码将是错误的,您需要到https://appleid.apple.com/account/manage"Security - Generate Password"
获取密码
If you get other wrong , you could add --verbose
to print detail errors log, just like
如果你有其他错误,你可以添加--verbose
打印详细错误日志,就像
xcrun altool --upload-app -f path -u username -p password --verbose
And , get more help with xcrun altool --help
并且,获得更多帮助 xcrun altool --help
回答by Serdar Mustafa
You can now also use a new app from Apple called "Transporter" that is a replacement for Xcode application loader.
您现在还可以使用来自 Apple 的名为“ Transporter”的新应用程序,它可以替代 Xcode 应用程序加载器。