Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: Compressing .app files in command line (Mac OS X) removes CodeSigning

I am trying to do a simple build automation of my iPhone apps with TeamCity, but having this nagging issue..

When I manually pickup and install .app file from the build folder it works great (syncs smoothly with iTunes and I can see the app on my phone)

But when I try to zip this with /bin/zip or ditto...then the zipped contents loose the CodeSigning (iTunes says that it cannot install this app because its not signed)

I have tried different combinations of these..

ditto -ck --rsrc --keepParent HelloWorld.app HelloWorld.zip

Any more ideas?

I tried this too but still getting the same error

version=$(date "+%Y-%m-%d.%H.%M.%S")
cd "$CONFIGURATION_BUILD_DIR"
zip -r -y "HelloWorld-$version.zip" HelloWorld.app
like image 453
Santthosh Avatar asked May 21 '10 00:05

Santthosh


People also ask

How do I extract a .app file on a Mac?

You can unzip a file on a Mac by double-clicking on it, or by right-clicking and selecting "Open."

How do I compress a tar GZ file on a Mac?

Create a compressed tar archive In the Terminal app on your Mac, enter the tar command, then press Return. The z flag indicates that the archive is being compressed, as well as being combined into one file. You usually use this option, but you aren't required to.


1 Answers

You need to use the -y option on zip:

zip -r -y zipped_blahapp.zip blahapp.app

-y

Store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link (UNIX only).

Update

Now the Xcode archive functionality is available from the command line, you should probably be using that:

xcodebuild archive -workspace $APPNAME.xcodeproj/project.xcworkspace -scheme $APPSCHEMENAME > $OUTDIR/logs/$APPNAME.log
like image 199
RedBlueThing Avatar answered Oct 11 '22 05:10

RedBlueThing