Commit #2 : Export your *.xcarchive to *.ipa via terminal!

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 :

Screen Shot 2015-01-09 at 17.12.22

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 :

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! 🙂

 

Advertisements

4 comments

  1. Adam Ardisasmita · March 19, 2015

    Wow you’re working at Ice House.
    Cool. I heard that place has a lot of top engineers 🙂
    Good luck

    Like

    • edopelawi · March 19, 2015

      Wuah, thank you kak Adam! Good luck for Arsanesia too ^^

      Like

  2. SandraClarisa · May 27, 2015

    Ohemji, cool abis ini
    aku gak ngerti samsek @.@

    Like

    • edopelawi · May 27, 2015

      Erm… ini technical blog sih koy, wajar kalau agak susah dimengerti buatmu ^^”

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s