无法将应用上传到 iTunes Connect

Posted

技术标签:

【中文标题】无法将应用上传到 iTunes Connect【英文标题】:Unable to upload app to iTunes Connect 【发布时间】:2013-05-29 08:20:10 【问题描述】:

我一直在尝试将我的应用程序提交到 iTunes Connect,但我收到了错误 An error occured uploading to the iTunes store。我已经使用 Xcode 和 Application Loader 进行了尝试。

我检查了系统日志,发现了这些错误:

Application Loader[820]:  Error:
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter: line 14: **awk: command not found**
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter: line 18: ../share/iTMSTransporter.woa/**iTMSTransporter: No such file or directory**
May 29 11:09:38 Ahmad-MacBook.local Application Loader[820]:  Out:*

这是我试图解决这个问题的方法:

一些网站提示问题出在 Java 上,所以我尝试回滚到 Java 1.6 和 Java 1.5,但没有成功,我还从 Oracle 的网站安装了 Java 1.7,但也没有成功; 删除 Xcode 并重新安装,但没有成功。

有人解决了这个问题吗?

我正在运行 OSX 10.8.3。当前的 Java 版本是:

java版本“1.6.0_45” Java(TM) SE 运行时环境(内部版本 1.6.0_45-b06-451-11M4406) Java HotSpot(TM) 64 位服务器 VM(内部版本 20.45-b01-451,混合模式)

【问题讨论】:

您是否使用 xcode 将其分发到应用商店?产品>存档>分发>提交到ios应用商店? 我试过 Product>Archive>Distribute>Submit to IOS appstore ,我也试过应用程序加载器。我得到了同样的错误 【参考方案1】:

我遇到了完全相同的问题,并且能够通过稍微调整文件来解决它

/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter

将 awk 的路径更改为绝对路径(我还取消了脚本路径的回显的注释,这可能不是必需的)。这是我更改的文件:

#!/bin/sh

# if the user has the run script in their PATH
# then we can get the path to the script from
# 'which'.  otherwise, we have to get the path
# from $0
if [ "$0" = "iTMSTransporter" ] ; then
  SCRIPT_PATH=`which iTMSTransporter`
else
  SCRIPT_PATH=$0
fi

# get the script's directory
SCRIPT_DIR=`echo $SCRIPT_PATH | /usr/bin/awk -F"/" 'print substr($0,1,length($0)-length($NF))'`

# call the transporter relative to the script's directory
echo Calling: $SCRIPT_DIR../share/iTMSTransporter.woa/iTMSTransporter "$@"
"$SCRIPT_DIR../share/iTMSTransporter.woa/iTMSTransporter" "$@"

我猜这种行为是由不正确的类路径设置引起的,但我无法解决。修复脚本后,我设法通过 XCode Organizer 上传了我的应用程序。

祝你好运!

【讨论】:

【参考方案2】:

试试这个(在终端输入)

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0

【讨论】:

我已经试过了,执行这些行后 $ java -version 命令应该是什么结果?

以上是关于无法将应用上传到 iTunes Connect的主要内容,如果未能解决你的问题,请参考以下文章

无法将应用上传到 iTunes Connect

无法上传应用程序 - '上传到 iTunes 商店时出错'

无法使用 Xcode 7.0.1 将应用程序上传到 iTunes Connect

无法使用 Application Loader 将 .ipa 上传到 iTunes

无法使用 Application Loader 将 .ipa 上传到 iTunes

无法将贴纸上传到 iTunes Connect