Use your jailbroken iPhone in Xcode for developing

If you want to test your apps developed on Xcode with your own jailbroken iPhone, you have to change some settings in Xcode. This guide will tell you everything you need to set up.

First of all I have to say that I was using my iPhone 4 wit iOS 5.0.1 and Xcode version 4.6. If you have other versions or another device this guide should still work, but I can’t guarantee anything. Every step is reversible so if you break anything up, just do this guide backwards or leave a comment.

1) Jailbreak your iDevice

You need a jailbroken iDevice to test your apps on it. If you haven’t done so, jailbreak your device with any guide out there. Just google for your iDevice and iOS version with the word jailbreak.

2) Install AppSync

If you have your iPhone jailbroken, go to Cydia and add the repository to your sources. Then search for AppSync iOS 5.0+ or similar, depending on your iDevice iOS version.

3) Create a certificate

In the Keychain app on your Mac, create a self-signed certificate with the name „iPhone Developer“. You do this by clicking on Keychain Access in the status bar, then Certificate Assistant -> Create a Certificate…
In the following windows insert or select and leave everything alse empty or unchecked:

  • Name: iPhone Developer
  • Identity Type: Self Signed Root
  • Certificate Type: Code Signing
  • Check „Let me override defaults“


  • Serial Number: 1
  • Validity Period: 3650


  • Name (Common Name): iPhone Developer


  • Key Size: 2048 bits
  • Algorithm: RSA


  • Check „Include Key Usage Extension“
  • Check „This extension is critical“
  • Check „Signature“


  • Check „Include Extended Key Usage Extension“
  • Check „This extension is critical“
  • Check „Email Protection“
  • Check „Code Signing“


  • Uncheck „Include Basic Constraints Extension


  • Check „Include Subject Alternate Name Extension“


  • Keychain: login

Then just hit „Create“ and after a lot of checking, unchecking and inserting you should have created your certificate successfully.

4) Modify plist files in Xcode

Change the following lines in the appropriate files:



Change to:




Change to:



This line appears two times, so make sure you modify both!


Change to:


5) Configure Xcode

The next steps will use the Mac terminal. If your new to the terminal make sure you do the exact same steps as described (you can break alot with the terminal).

Run the following commands within the terminal:

cd /Applications/\ Build\ System\ Support.xcplugin/Contents/MacOS/
cp ./iPhoneOS\ Build\ System\ Support ./iPhoneOS\ Build\ System\
printf "\xc3\x26\x00\x00" >> ./iPhoneOS\ Build\ System\ Support
chmod a+x iPhoneOS\ Build\ System\ Support

After that configure Xcode to do not code sign like in the picture below:


6) Configure fake-code signing

Next you need to tweak some settings to make fake code-sign work. Insert the following in the terminal:

mkdir /Applications/
cd /Applications/
curl -O
mv gen_entitlements.txt
chmod 777

7) Plug in the iPhone

Now you have to connect your jailbroken iPhone with your computer and open Xcode afterwards. Then open Window->Organizer in the menu, select your device on the left side and click on „Use for development“. If you get a prompt like „iPhone Provisioning Portal Login“, just cancel it.

7) Add a run-srcript to your project

Make sure you do the following steps for every new project you create!

In the menu go to Project > New Build Phase > New Run Script Build Phase. Then add the following lines:

export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Developer/iphoneentitlements401/ "${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"

Now you are ready to go! Select your jailbreak iPhone in the top-left dropdown and run your app!


Many credits and a big THANKS go to:
Alex Whittemore
Vishal Agarwal