I have an iPhone 3G which I managed to jailbreak and unlock since I’m living in Malaysia. I had to unlock it by myself since the iPhone 3G is only going to be launched on March 20th in Malaysia. Being an iPhone app developer developer as well I needed a solution to transfer the apps that I develop on XCode to my iPhone 3G to test it out. Since the iPhone 3G has been unlocked it wouldn’t be possible for me to register it with Apple which is a pre requisite for me to “legally” transfer the apps to my iPhone 3G for testing. But there is another way to go about it for jailbroken iPhones.
Here’s a short and simple way by which you can transfer the apps that you develop on XCode via WiFi to your iPhone 3G:
1. First build the application in Xcode using mode
-> Build -> Device (Release)
2. Open up Terminal
3. Open up 2 windows in Terminal
4. In one window type
-> ssh root@
-> login with username: root and password: alpine
5. Goto directory /Applications
6. Create directory called .app – Note: must have ‘.app’ in the end
7. type -> chmod 775 .app
8. Then go to the directory in terminal
-> Documents ->
-> build -> Release-iphoneos -> .app
9. type
-> sftp root@
10. then type
-> cd /Applications/.app
-> mput *
11. Then go to the 1st terminal screen
12. Type
-> ldid -S Note: without .app in the end
13. Then type
-> killall -HUP SpringBoard
That’s it. Now you have your iPhone app that you developed loaded on your jailbroken iPhone 3G. Now you can do all the testing you want to ensure that its stable before submitting on iTunesconnect. Have fun!
UPDATE (March 19th 2009): My assumption is that you would have installed openSSH and ldid from Cydia on your jailbroken iPhone. In case you haven’t, you will need to install both these applications before trying out the above steps.
If you enjoyed this post, make sure you subscribe to my RSS feed!



#1 by Kevin - March 17th, 2009 at 08:22
Hi, MatBlogger!
I am happy you teach us how to make Xcode on iPhone.
But I have not bought IPhone 3G, I still use my Nokia N70.
Thanks for share with us.
#2 by matblogger - March 17th, 2009 at 08:57
Hi Kevin,
Hope you will get your iPhone soon as it will shortly be launched by Maxis.
#3 by iPhoneDevGuy - March 17th, 2009 at 08:30
Hi MatBlogger,
There is another way, that is to use adhoc provisioning profile, or you can use your development profile since you’ve registered with ADC.
#4 by matblogger - March 17th, 2009 at 08:54
Hi iPhoneDevGuy,
Wouldn’t that require me to register my iPhone with Apple as a development device? I am using the current ftp method since my iPhone has been unlocked and jailbroken as well. My understanding is that transferring apps to the iPhone via an adhoc provisioning profile would require a “legal” iPhone. Do correct me if I am wrong. Thanks for your input!
#5 by iPhoneDevGuy - March 17th, 2009 at 09:13
Hi,
That is what I thought initially and doing the ssh thingy really frustrate developers like us. You can still register your device at ADC portal, even with Jailbroken phone, you still able to install apps from App Store, right ? It is the same concept
#6 by matblogger - March 17th, 2009 at 09:18
Brilliant! Something that I will definitely try. Thanks for sharing iPhoneDevGuy!
#7 by Pepo - May 11th, 2009 at 21:57
And does it work?!
#8 by Pepo - May 11th, 2009 at 23:26
Thnaks!!
#9 by matblogger - May 11th, 2009 at 22:11
Yes absolutely. But you can also use the traditional way by adding your device as a development device. That’s the method I am using now.