以前,使用Xcode 10时,我们使用altool上传到App:
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"但是使用Xcode 11,“应用程序Loader.app”不再存在,作为Xcode 11更改的一部分
Xcode支持使用xcodebuild或xcrun工具从组织者窗口或命令行上传应用程序。应用程序加载器不再包含在Xcode中。(29008875)
那么,我们现在如何从命令行上传到TestFlight或App呢?
发布于 2019-06-04 01:38:27
使用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"获得更多关于xcrun altool --help的帮助。
发布于 2019-09-24 01:11:20
使用命令行工具,
xcrun altool --upload-app -f path -u username -p password如果您的苹果帐户使用双因素身份验证,您的密码可能是错误的,您需要转到https://appleid.apple.com/account/manage "Security - Generate Password"获取密码。
如果您有其他错误,可以添加--verbose来打印详细错误日志,就像
xcrun altool --upload-app -f path -u username -p password --verbose并且,获得更多关于xcrun altool --help的帮助
发布于 2020-06-04 22:00:43
至少在Xcode 11中,作为导出工作流的一部分,使用xcodebuild可以非常容易和直接地完成这一任务。只需创建一个exportOptions.plist文件,为“目的”键指定“上传”,为“方法”键指定“应用程序存储”。这里有一个例子,但当然要根据您的需要来调整:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<true/>
<key>destination</key>
<string>upload</string>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>YOUR_BUNDLE_ID</key>
<string>YOUR_PROFILE_NAME</string>
</dict>
<key>signingCertificate</key>
<string>YOUR_CERT_NAME</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
<key>thinning</key>
<string><none></string>
</dict>
</plist>有了这些之后,使用xcodebuild exportArchive命令将存档上传到应用程序存储连接非常简单:
xcodebuild -exportArchive \
-archivePath PATH_TO_APP_ARCHIVE \
-exportPath OUTPUT_PATH \
-exportOptionsPlist exportOptions.plist如果您想知道您的PATH_TO_ARCHIVE在哪里,那么首先只需使用xcodebuild 归档命令,例如:
xcodebuild -sdk iphoneos \
-workspace myWorkspace.xcworkspace \
-scheme myScheme \
-configuration Release \
-archivePath PATH_TO_ARCHIVE archivehttps://stackoverflow.com/questions/56436345
复制相似问题