I have a Mac OS X Lion setup with XCode 4.3. I am not a registered Apple developer.
I told, via the plist files: /Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist
and
/Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/SDKSettings.plist
, XCode not to require codesigning.
I then compiled my project, just a basic iPhone app project, it ran well in simulator. I could build and archive it, then sign it using a self-created certificate and the archive appeared in the Organizer.
Nothing strange for the moment, but there comes the problem: I have no "Share" button in the organizer. I absolutely need to make an IPA file out of my project if I want it to work under an iPhone as it won't accept xcarchive files. I only get the "Validate" and "Distribute" buttons which both require to be a registered Apple developer. But, no "Share" button which enables building an IPA... for free.
I have gone through XCode settings but nothing seemed to help me there. Even the documentation says a Share button is available in XCode 4.3, so my question is: Why don't I get the possibility to make an IPA? IS there any workaround to get this Share button or make an IPA out of the xcarchive via any command line or whatever?
Here's how you can make an IPA in XCode 4.3:
To Disable Code Signing:
- Go to
/Applications
. - Right click on XCode and select 'Show Package Contents'.
- Copy
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist
to your desktop. (Make sure to actually copy and paste. No drag and drop) - Open it and under
DefaultProperties
setCODE_SIGNING_REQUIRED
toNO
. - Copy it back and replace the original file.
- Restart XCode.
- Open your project.
- In Project Navigator select your project and open
Build Settings
section of your porject (and not any particular target) - Under
Code Signing
findCode Signing Identity
and for bothDebug
andRelease
modes setAny iOS SKD
toDon't Code Sign
. - Now you should be able to build your project without any errors.
To make an IPA:
- In 'Project Navigator' select Products
- Right click on
[NameOfYourProject].app
and select 'Show in Finder'. - Create a folder and name it
Payload
- Move
[NameOfYourProject].app
toPayload
. - Compress
Payload
and rename it to[NameOfYourProject].ipa
You should be able to get an IPA by clicking 'Distribute...' in Organizer->Archives, and choosing to 'Save for Enterprise or Ad-Hoc Deployment'.
Beginning iOs 5.1 Apple moved their files from /Developer/... to XCode->Show Package Content In order to export codesign_allocate correctly run this line on your Mac terminal : export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
来源:https://stackoverflow.com/questions/9350972/how-to-make-an-ipa-on-xcode-4-3