使用命令行上传 ipa 到 App Store(iTMSTransporter 3.3)
之前写过一篇使用 iTMSTransporter 2.2 上传 ipa 的文章:
《如何使用 iTMSTransporter 命令行上传 ipa 到 App Store》
然而在近期苹果废弃了 iTMSTransporter 2.2,使用会报错:
java.util.concurrent.ExecutionException: java.lang.SecurityException: java.security.cert.CertificateExpiredException: NotAfter: Fri Oct 11 01:37:19 CST 2024at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)at com.apple.transporter.launcher.Application.start(Application.java:214)at com.apple.transporter.launcher.Application.main(Application.java:766)
Caused by: java.lang.SecurityException: java.security.cert.CertificateExpiredException: NotAfter: Fri Oct 11 01:37:19 CST 2024at com.apple.transporter.launcher.loader.PinnedX509TrustManager.verifyCertificateChain(PinnedX509TrustManager.java:141)at com.apple.transporter.launcher.loader.SignatureVerifier.verifyOrThrow(SignatureVerifier.java:71)at com.apple.transporter.launcher.loader.OSGIBootstrapClassLoader.loadChecksums(OSGIBootstrapClassLoader.java:360)at com.apple.transporter.launcher.loader.OSGIBootstrapClassLoader.<init>(OSGIBootstrapClassLoader.java:210)at com.apple.transporter.launcher.Application.lambda$start$3(Application.java:190)at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Fri Oct 11 01:37:19 CST 2024at java.base/sun.security.x509.CertificateValidity.valid(CertificateValidity.java:277)at java.base/sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:627)at java.base/sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:600)at com.apple.transporter.launcher.loader.PinnedX509TrustManager.verifyCertificateChain(PinnedX509TrustManager.java:120)... 9 more
解决方法是安装 iTMSTransporter 3.3 上传。
下载地址:https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/resources/download/public/Transporter__OSX/bin/
使用方法:
其参数与 2.2 相同,只是程序路径从 /Applications/Transporter.app/Contents/itms/bin/iTMSTransporter
变成了 /usr/local/itms/bin/iTMSTransporter
所以只需要把命令路径改一下就可以继续使用了:
/usr/local/itms/bin/iTMSTransporter -m upload -assetFile <ipa_path> -u <user_name> -p <private_password> -v informational
该命令的介绍详见我之前的文章: 《如何使用 iTMSTransporter 命令行上传 ipa 到 App Store》
或者参考官方的使用说明(中文的):《Transporter 用户指南 3.3》