0

I've been trying to submit my app to iTunes connect, but I've been getting the error An error occured uploading to the iTunes store. I've tried this using Xcode and the Application Loader.

I checked the system log and I found these errors:

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:*

Here's what I tried to solve this problem:

  • some sites suggested that the problem is with Java, so I tried rolling back to Java 1.6 and Java 1.5 and it didn't work, I also installed Java 1.7 from Oracle's website but it didn't work either;
  • deleted Xcode and reinstalled it with no success.

Did anyone manage to solve this problem?

I'm running OSX 10.8.3. The current Java version is:

java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)

skuntsel
  • 11,624
  • 11
  • 44
  • 67
ahmad
  • 1,212
  • 1
  • 14
  • 28
  • Are you distributing it to appstore using xcode?. Product>Archive>Distribute>Submit to IOS appstore? – Navn May 29 '13 at 09:10
  • I've tried Product>Archive>Distribute>Submit to IOS appstore , and I also tried the application loader. I got the same error – ahmad May 29 '13 at 09:18

2 Answers2

1

i had exactly the same issue and was able to fix it by slightly adapting the file

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

change the path to the awk to absolute (and i also uncommented the echo of the script path, which probably isn't necessary). Here my changed file:

#!/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" "$@"

i guess this behavior is caused by inproper classpath setup which i wasn't able to resolve though. After fixing the script, i managed to upload my app through the XCode Organiser.

Good luck!

0

try this (type in terminal)

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
Liolik
  • 791
  • 6
  • 12
  • I've already tried this , what should be the result of the command $ java -version after executing these lines ? – ahmad May 29 '13 at 19:15