How to deploy an iPhone application without an IDP Membership

January 16, 2009 · 28 comments

An iPhone Developer Program (IDP) membership (costs $99 for Individuals) is required to officially deploy your application on the iPhone – even during the development and testing. Though I have applied for the IDP membership long ago, mine is yet to be approved. Perhaps India is not a listed country for IDP.

Not having an IDP membership will not affect your iPhone development and further testing on a real iPhone. But you would still require a Jailbroken iPhone. You will have to tweak your XCode (Version 3.1.2) and individual project settings – along with the iPhone (Firmware 2.2) – to get the Applications deployed on the phone. Here are the steps. These information were collated by the results of endless queries posted on different forums and by reading various material available on the Web. All the credits are due to their respective owners :)

Common Instructions to Install :-

• Jailbreaking the iPhone requires you to follow the clear instructions given by iClarified. This includes a Video demonstration also. There is no need to Unlock your iPhone. Just Jailbreak should suffice.

• Install the iPhoneTunnel and CyberDuck applications on the Mac

• Install OpenSSH, BossPrefs and Link-Identity-Editor applications using the Cydia application on the iPhone. After installation Reboot the iPhone

• Add source in Cydia (if you have not yet done so), please remember there is a slash (/) at the end of the url Code: http://www.iphone.org.hk/apt/ . Install MobileInstallation Patch version 2.2 in Section “Tweaks”

• Connect the iPhone using the USB Cable to the Mac

• Close the iTunes.

Setting up XCode to Compile and Build the iPhone Application

• Create a Signing Identify on your Mac by following this simple guide from Apple. I suggest you name the Certificate as “iPhone Developer”

• TextEdit the /Developer/Platforms/iPhoneOS.platform/Info.plist file to look the respective portions like:-

   1: <key>NATIVE_ARCH</key>
   2: <string>armv6</string>
   3: <key>PLIST_FILE_OUTPUT_FORMAT</key>
   4: <string>binary</string>
   5: <key>PROVISIONING_PROFILE_ALLOWED</key>
   6: <string>NO</string>
   7: <key>PROVISIONING_PROFILE_REQUIRED</key>
   8: <string>NO</string>
   9: <key>SDKROOT</key>
  10: <string>iphoneos2.2</string>

• Change your own Project Settings by taking [Menu] Project->Edit Project Settings. In the Properties List, find the Code-Signing-Identity and Select the Certificate Name(iPhone Developer) you created earlier.

• Add the following snippet on to your projects info.plist using TextEdit

   1: <key>SignerIdentity</key>
   2: <string>Apple iPhone OS Application Signing</string>

Transferring the Application Binary to the iPhone over USB

• You may duplicate the following steps using an Ad-Hoc WiFi connection too, of which I am not so fond off!. I prefer the USB.

• Start the iPhoneTunnel Application on the Mac. You should see a respective icon on the Superior Bar at the top of the screen. Click on that Icon and select [Turn Tunnel ON]

• Again click on the same icon on top and select [Tools->SFTP]. The Cyberduck should start automatically. Enter the username as ‘root’ and password as ‘alpine’ in the cyberduck login window.

• Copy the TestApp.app (Your Own App) to the /Application folder of the iPhone using Cyberduck

• Click on the iPhoneTunnel icon and select [Tools->SSH(root)]. Enter the root/alpine credentials at the command prompt.

• At this command prompt enter the following two commands:-

ldid -S /Applications/TestApp.app/TestApp

chmod +x /Applications/TestApp.app/TestApp

• Open the BossPrefs application on the iPhone and choose the “ReSpring” option. This will restart the SpringBoard application to show your application on the Home Screen.

• Enjoy Your App!

If you have a proper Code signing Signature from Apple , you can follow these great instructions to deploy on to AppStore.

{ 23 comments… read them below or add one }

Sam January 31, 2009 at 10:34 am

Thanks. After experimenting for a while I got it working.

Reply

Arjit gupta April 17, 2009 at 4:13 pm

Can you explain this step … please

“TextEdit the /Developer/Platforms/iPhoneOS.platform/Info.plist file to look the respective portions like:-”

Reply

naveen February 7, 2009 at 10:38 pm

Nice Instruction. Thanks!

I couldn’t get this working in iPhone FM 2.2. I created certificate “iPhone Developer” per instruction and it is associate to keychain “System”. The cert is not signed by CA.

Mac OS 10.5.5, iPhone SDK 2.2.1

Executed following command

Xcodebuild -target HelloWorld

Build Succeed, ftped to iphone

Ldid is issuing segment fault. If the code is not signed than ldid doesn’t give segment fault. Either way the app open ups in iphone but get killed quickly. What am I doing wrong? Any input is highly appreciated.

root# ldid -S /Applications/HelloWorld.app/HelloWorld
Segmentation fault

Reply

Zaiden February 19, 2009 at 6:19 am

I’m following every step, but it doesn’t appear on springboard and if I try to execute it from MobileConsole, the only thing I get is a “Killed” message.

Do you know what’s going on?

Reply

lyssipos March 18, 2009 at 10:44 pm

Thank you so much!! I had been researching how to get my app developed in Xcode onto my device and was having a hard time figuring it all out. After many hours researching I ran into your post, followed your steps and everything works great! Thanks again

Reply

Vinod Ponmanadiyil April 6, 2009 at 8:05 pm

Glad I could help!

Reply

Arjit April 17, 2009 at 1:53 pm

hey i tried i am little confused because which app we have to transfer

simulator|Debug or device|release

Please tell me if its important !!!!

Reply

himanshu April 20, 2009 at 1:09 pm

the SIMPLE GUIDE link is dead….

this might help….

http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW1

but i still dont know how to get this certificate…..can you help me figure…..

Reply

Arjit April 30, 2009 at 5:26 pm

I have an iPod Touch i am able to install the apps their icon is their on the desktop of iTouch but when i launch it. It gives an error.

Any help Please ?

Reply

Tristan June 4, 2009 at 5:40 am

Not working, Segmentation fault. Please tell us why its not working.

Reply

Tristan June 4, 2009 at 6:17 am

Ok, figured out the issue.

You have to change the device from Simulator to Iphone OS under the overview dropdown, then compile (Also change Debug to Release if you haven’t). Be sure to go into the correct folder when transferring to cyberduck too as the simulator builds are in a different folder than the iphoneos builds. What I did was right click on the app name under the Products folder in xcode, and click “View In Finder” to get its exact location.

Hope that aids someone having issues like I did.

Thank you for this tutorial, this will help out immensely.

Reply

Mike June 14, 2009 at 6:12 pm

I can’t believe this worked! Thank you!

One comment though – I couldn’t work out where the files were that I should SFTP to the phone. I looked through the build directory of my project, and its subdirectories, but couldn’t find the executable that I assume the compiler must create. (I’m still a noob at this so forgive my ignorance.)

But I found that the manual SSH steps weren’t even necessary – I changed from Simulator to Device, hit Build & Go, and Xcode deployed the app to the phone automatically. So for me, all the steps after “Transferring the Application Binary to the iPhone over USB” were unnecessary. Just let Xcode take care of that bit for you.

But nice work though!

Reply

Chhoda July 2, 2009 at 7:04 pm

hey will this procedure work for iphone os 3.0 ? it is not working ! saying code signing related to yourfile.com is not found

Reply

Vinod Ponmanadiyil July 23, 2009 at 12:51 am

I have not tested this on the 3.0 firmware – I don’t need to now as I have a iPhone developer account.

Reply

Matt August 19, 2009 at 11:54 am

Thanks for the guide. I had a few problems getting it to work, the app would immediately crash after attempting to start it. After modifications to the permissions, it’s working well now. Instead of (or in addition to) doing “chmod +x /Applications/TestApp.app/TestApp”, I did this in CyberDuck:

-Navigated to my application folder “/Applications/AppName.app”
-Right/Control clicked on my application
-Checked permissions for read access for all roles, write access for “Owner” only, Execute access for all roles

After that, my app booted up.

Reply

keith October 7, 2009 at 8:29 pm

I followed the steps but my project won’t compiled with error “Code Sign error: a valid provisioning profile matching the application’s Identifier ‘com.yourcompany.HelloWorld’ could not be found”. Anyone know what problem is please?

Thanks,
Keith

Reply

John November 12, 2009 at 5:10 pm

@keith

Same problem here. Anyone?

Reply

arjit November 12, 2009 at 5:38 pm

you can just right apple as your company :P

Reply

closms February 6, 2011 at 11:13 am

I had this problem. In /Developer/Platforms/iPhoneOS.platform/Info.plist the string XCiPhoneOSCodeSignContext appears three times. I only changed the first appearance to XCCodeSignContext. After changing all three the build worked.

Reply

viccer November 20, 2009 at 9:16 am

buy IDP, it’s worth the tiring routine of figuring it out. This hack no longer worth for FW 3.0 onwards

Reply

koekje00 December 10, 2009 at 9:19 pm

how did you fix \Code Sign error: a valid provisioning profile matching the application’s Identifier ‘com.yourcompany.HelloWorld’\ error?

Reply

Fred Camden March 2, 2010 at 1:20 am

Viccer is right, this hack no longer works for 3.x (March 2010).

Reply

Josh March 3, 2010 at 4:25 am

Does anyone have any idea how to make this work on 3.x?

Reply

Leave a Comment

 

{ 5 trackbacks }

Previous post:

Next post: