Xcode 11通过命令行卡住

时间:2019-10-08 13:46:12

标签: ios command-line upload xcode11 xcrun

由于Xcode 11现在不带应用程序加载器,因此我尝试通过命令行工具xcrun altool上传我的应用程序。 我首先在应用商店连接上创建了一个apiKey。然后,我使用以下命令上传了我的应用程序:

xcrun altool --upload-app --type iOS --file <path-to-ipa> --apiKey <keyID> --apiIssuer <IssuerID> --verbose 

我看到了一些日志,看来它正在运行,但随后被卡在这里:

  

2019-09-26 15:33:38.362 altool [62528:4432964]使用工具'/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor '。   2019-09-26 15:33:38.362 altool [62528:4432964]'DTAppAnalyzerExtractor':self.executablePath:/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources / DTAppAnalyzerExtractor   2019-09-26 15:33:38.363 altool [62528:4432964]正在启动:/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor --input- dir /var/folders/_1/7_lm5w6j5px21sd311p2g7340000gn/T/xxx.ipa-输出文件/ var / folders / _1 / 7_lm5w6j5px21sd311p2g7340000gn / T / DTAppAnalyzerExtractorOutput-DCBxxx406xxB4E-Cxxx6C53F2。   2019-09-26 15:33:42.725 altool [62528:4432963] Web服务调用(validateSoftwareSPIUsage)结果:(空)   2019-09-26 15:33:42.856 altool [62528:4432963]使用名为的模板:Purple-metadata-template   2019-09-26 15:33:42.858 altool [62528:4432956]发送请求到iTunesTransporter ...   2019-09-26 15:33:42.859 altool [62528:4432956]命令:/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin/iTMSTransporter   2019-09-26 15:33:42.859 altool [62528:4432956]参数:-m上传-u'xxx@icloud.com'-vp json -TxHeaders eyJqZW5xxxxxXRlIjoicHYifQ == -sessionid @env:0028Bxxxxx8D1xxxxxxx-BFxxxxA75 @ensharedsecret :xxxxxxxx -f'/var/folders/_1/7_lm5wxxxxp2g7340000gn/T/8B0E8xxx4AD7-A547-4xxBD53/1219768922.itmsp'-indicator true -v eXtreme -Dtransporter.client ='altool'-Dtransporter.client.version ='4.00( 1181)'   2019-09-26 15:33:45.901 altool [62528:4432953]   [2019-09-26 15:33:45 MESZ]信息:配置日志记录...   2019-09-26 15:33:45.914 altool [62528:4432953] [2019-09-26 15:33:45 MESZ]信息:日志记录级别设置为极限

有人遇到相同的问题并找到了解决方案吗?

编辑:

好的,我解决了这个问题。我删除了xcode(及其所有依赖项)并重新安装了它。重新启动我的Mac,然后开始工作。

2 个答案:

答案 0 :(得分:1)

在我的MacBook重新启动后,我通过altool运行sudo解决了这个问题。

sudo xcrun altool --upload-app -t ios -f xxx.ipa -u xxx -p xxx --verbose

它不会再卡住了。

2019-12-18 23:53:30.676 altool[7779:157434] [2019-12-18 23:53:30 CST] <main>  INFO: Configuring logging...
2019-12-18 23:53:30.691 altool[7779:157434] [2019-12-18 23:53:30 CST] <main>  INFO: Logging level set to eXtreme
2019-12-18 23:53:30.696 altool[7779:157434] [2019-12-18 23:53:30 CST] <main>  INFO: Transporter is searching for new software components.
2019-12-18 23:53:30.696 altool[7779:157434] [2019-12-18 23:53:30 CST] <main>  INFO: INFO: using cached repository.xml file.
2019-12-18 23:53:42.705 altool[7779:157434] [2019-12-18 23:53:42 CST] <pool-3-thread-2>  INFO: Download complete for: org.apache.httpcomponents.httpcore/4.4.11.
2019-12-18 23:53:42.746 altool[7779:157434] [2019-12-18 23:53:42 CST] <main>  INFO: indexing file: /var/root/Library/Caches/com.apple.amp.itmstransporter/obr/2.0.0/org.apache.httpcomponents.httpcore-4.4.11.jar
2019-12-18 23:53:42.784 altool[7779:157434] [2019-12-18 23:53:42 CST] <main>  INFO: indexing file: /var/root/Library/Caches/com.apple.amp.itmstransporter/obr/2.0.0/org.apache.felix.configadmin-1.9.10.jar
2019-12-18 23:53:42.787 altool[7779:157434] [2019-12-18 23:53:42 CST] <main>  INFO: indexing file: /var/root/Library/Caches/com.apple.amp.itmstransporter/obr/2.0.0/org.apache.felix.scr-2.1.14.jar
2019-12-18 23:53:42.796 altool[7779:157434] [2019-12-18 23:53:42 CST] <main>  INFO: indexing file: /var/root/Library/Caches/com.apple.amp.itmstransporter/obr/2.0.0/org.apache.logging.log4j.api-2.11.2.jar

答案 1 :(得分:0)

使用xcodebuild更好

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

ExportOptionsUpload.plist包括

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

查看详细信息

man xcodebuild