December last year, several Ice House clients asked for Christmas update on their app. There’s a strange case that occurred when our team tried to send old projects to the iTunesConnect using Xcode 6’s Organizer, just like this image :
Our supervisor, Didiet, said this issue might be caused by the project file. The project was built on Xcode 5.1 and we’re trying to publish it from Xcode 6. Since we don’t have much time left, we ended up using xcodebuild
‘s exportArchive
command from terminal to export the *.xcarchive from Organizer to *.ipa :
xcodebuild -exportArchive -archivePath [*.xcarchive path] -exportPath [*.ipa output path] -exportProvisioningProfile [provisioning profile name]
To retrieve the *.xcarchive’s path, we opened the Organizer, right-clicked the wished archive, and selected “show in Finder” menu. After the *.ipa extracted, we send it to iTunesConnect using Xcode’s Application Loader – successfully! It was Friday night, and xcodebuild
saved our weekend! 😀
I still found the same issue on several old projects, and didn’t found how to fix it – so I ended up using that xcodebuild
command to send new builds to App Store. Tired of typing the long command over and over again, I made this script to make the process easier :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helptext="Usage: `basename $0` [*.xcarchive path] [*.ipa export path] [provisioning profile name]" | |
if [ "$1" == "-h" ] || [ "$1" == "–help" ]; then | |
echo $helptext | |
exit 0 | |
fi | |
if [ "$#" -ne 3 ]; then | |
echo "Illegal number of parameters. $helptext" | |
exit 0 | |
fi | |
archivepath=$1 | |
exportpath=$2 | |
provisioningprofile=$3 | |
xcodebuild -exportArchive -archivePath "$archivepath" -exportPath "$exportpath" -exportProvisioningProfile "$provisioningprofile" |
To make it accessible from everywhere, I put that script on my /usr/local/bin
directory. Now, exporting new *.ipa is as easy as writing xcodebuild_export_xcarchive
and it’s parameters on my iTerm. 🙂
Thank you for reading! 🙂
Wow you’re working at Ice House.
Cool. I heard that place has a lot of top engineers 🙂
Good luck
Wuah, thank you kak Adam! Good luck for Arsanesia too ^^
Ohemji, cool abis ini
aku gak ngerti samsek @.@
Erm… ini technical blog sih koy, wajar kalau agak susah dimengerti buatmu ^^”