Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create .ipa app on Xcode 4.5.2

Tags:

xcode4.5

How can I create a .ipa file in the new Xcode and deploy it to my jailbroken iPhone 4S on iOS 5.1.1?

The .app in Xcode is red so I can't show it on Finder.

I'm not currently registered to the Apple developer program.

Thanks!

like image 724
oridahan Avatar asked Nov 04 '22 09:11

oridahan


2 Answers

You need to Archive the project and then select Export as Xcode Archive (see this Apple guide).

You then need to find the Archive in Finder, which you can do by right-clicking the archive in Xcode and selecting Show in Finder.

To get it onto your phone you can use Installous.

like image 141
trojanfoe Avatar answered Nov 08 '22 06:11

trojanfoe


You cannot use the built in archive command without a profile/certificate unless you hack the SDK.

I haven't tested the above since iOS 6 and Xcode 4.2. I cant imagine a lot changed between 4.2 and 4.5. After applying those changes you can build with a self signed certificate or none at all.

I don't remember if this will allow you to directly use the IPA build in xcode, but if not it is trivial to make a build phase run a shell script to do so. here is one I made for GemRB:

#increment the version number for the build
REV=`git log --pretty=format:'' | wc -l | sed 's/\ //g'`
VERSION=`git describe --tags --dirty=-patched`
DATE=`date -u +%Y-%m-%d\T%T\Z`

/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $REV" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"

#updtate the iTumesMetaData
cp ios/iTunesMetadata.plist.in ios/iTunesMetadata.plist
/usr/libexec/PlistBuddy -c "Set :softwareVersionExternalIdentifier $REV" "ios/iTunesMetadata.plist"
/usr/libexec/PlistBuddy -c "Set :releaseDate $DATE" "ios/iTunesMetadata.plist"

#make iOS ipa
#purge payload of everything
if [ -d `ios/Payload`];
then
rm -r ios/Payload;
fi
mkdir -p ios/Payload

WORKING_DIR=`pwd`

cp -r "$BUILT_PRODUCTS_DIR"-iphoneos/GemRB.app ios/Payload/GemRB.app
cd ios
zip -r GemRB-ios-$VERSION.ipa iTunesArtWork iTunesMetadata.plist Payload

# copy the optional plugins
cd ..
cp "$BUILT_PRODUCTS_DIR"/OGGReader.so "$BUILT_PRODUCTS_DIR/$PLUGINS_FOLDER_PATH"/OGGReader.so
cp "$BUILT_PRODUCTS_DIR"/PNGImporter.so "$BUILT_PRODUCTS_DIR/$PLUGINS_FOLDER_PATH"/PNGImporter.so

obviously change some of the path variables and strip out the auto-version stuff if you don't want it.

like image 27
Brad Allred Avatar answered Nov 08 '22 07:11

Brad Allred