我最近升级到Catalina和Xcode 11。
现在,当我尝试从组织者上传存档时,我收到一个简单的错误,说«"错误域=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.
Java 1.6 很古老!卡塔琳娜甚至没有可下载的软件包。
知道这里出了什么问题吗?
这是命令行工具的输出(针对路径和密码进行了编辑(:
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.}"
罪魁祸首是我系统上一个名为"/usr/local/itms/"的目录,里面有一个非常古老的2008年iTMSTransporter。Xcode出于某种原因使用该旧工具。在我删除整个目录并重新启动 Xcode 后,它起作用了!
功劳归于推特上的@BigZaphod!(这是直接引用(
转到首选项>网络>高级>代理并选中"自动代理发现"和"自动代理配置",无法检查其他代理选项。最后取消选中"袜子代理"选项,这为我解决了问题。
使用xcodebuild
更好
xcodebuild -exportArchive -exportOptionsPlist /pathTo/ExportOptionsUpload.plist -archivePath /pathTo/App.xcarchive
ExportOptionsUpload.plist
包括
<key>destination</key>
<string>upload</string>
查看详细信息
man xcodebuild