Xcode11 使用管理器上传 IPA 失败

Xcode 11 using organizer to upload IPA fails

我最近升级到 Catalina 和 Xcode11.

现在,当我尝试从组织者上传档案时,我收到一个简单的错误提示 «"Error Domain=WorkerErrorDomain Code=-10000 "上传到 App Store 时发生错误。”»

因为这不是真正的错误消息,我尝试使用 xcrun altool 上传 ipa。

那就是事情变得有趣的时候。这失败并出现以下错误:

Java 1.5 or Java 1.6 is required. Currently, java is the default java version. Please upgrade.

Java1.6太古了! Catalina 甚至没有可下载的软件包。

知道这里出了什么问题吗?

这是命令行工具的输出(针对路径和密码进行了编辑):

Using tool '/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor'.
'DTAppAnalyzerExtractor': self.executablePath: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor
Launching: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor --input-dir /var/folders/bj/xxxxx/T/myipa.ipa --output-file /var/folders/bj/xxxxx/T/DTAppAnalyzerExtractorOutput-xxxxx.zip
Web service call (validateSoftwareSPIUsage) result: (null)
Using template named: purple-metadata-template
Sending request to iTunesTransporter...
Command: /usr/local/itms/bin/iTMSTransporter
Arguments: -m upload -u 'myusername@mydomain.com' -vp json -TxHeaders xxxxx== -sessionid xxxxx -sharedsecret xxxxx -f '/var/folders/bj/xxxxx/T/xxxxx/xxxx.itmsp' -indicator true -v eXtreme -Dtransporter.client='altool' -Dtransporter.client.version='4.00 (1181)'
Java 1.5 or Java 1.6 is required. Currently, java is the default java version. Please upgrade.
Error:
Java 1.5 or Java 1.6 is required. Currently, java is the default java version. Please upgrade.
Out:
Errors: (null)
*** Error: Errors uploading '/Library/Documents/myapp.ipa': (
    "Error Domain=WorkerErrorDomain Code=-10000 \"An error occurred uploading to the App Store.\" UserInfo={NSLocalizedDescription=An error occurred uploading to the App Store., NSLocalizedFailureReason=An error occurred uploading to the App Store.}"

使用xcodebuild更好

xcodebuild -exportArchive -exportOptionsPlist /pathTo/ExportOptionsUpload.plist -archivePath /pathTo/App.xcarchive

ExportOptionsUpload.plist 包括

<key>destination</key>
<string>upload</string>

查看详情

man xcodebuild  

罪魁祸首是我系统上名为“/usr/local/itms/”的目录,其中有一个 2008 年的非常旧的 iTMSTransporter。 Xcode 出于某种原因使用那个旧工具。在我删除了整个目录并重新启动后 Xcode,它成功了!

感谢推特上的@BigZaphod! (这是直接引用)

前往首选项 > 网络 > 高级 > 代理并勾选 "Auto Proxy Discovery" 和 "Automatic Proxy Configuration",其他代理选项无法勾选。最后取消选中 "SOCKS Proxy" 选项,这为我解决了问题。