18
votes

I'm trying to install my iOS app on to my device running iOS 5.1. It's not currently jailbreaked but if that's what it takes I'll do that.

When i was running iOS 5.0.1 I followed this thread: How can I deploy an iPhone application from Xcode to a real iPhone device? and created a self-signed certificate, that worked like a charm.

I'm not able to get it working after updating to Xcode 4.3.2 and iOS 5.1

I'v also tried following this thread but with no success: Test iOS app on device without apple developer program or jailbreak

So how do I install my apps from Xcode 4.3.2 to my iPhone 4 running iOS 5.1, without being member in a developer program?

EDIT: I am now able to get the applications on to the iPhone. But when i try to start them they crash, not even the launch image comes up. I've Jailbroken the device, installed Appsync, edited the SDKSettings.plist and changed the build properties to "Don't code Sign".

This is what the console gives me when i try to start the app, i'm not getting any crash log in Xcode:

May  8 18:25:35 unknown SpringBoard[54] <Warning>: Unable to obtain a task name port right for pid 1017: (os/kern) failure
May  8 18:25:35 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.KerschApps.Test[0x2fa8]) Exited: Killed: 9
May  8 18:25:35 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.KerschApps.Test[0x2fa8]) Throttling respawn: Will start in 2147483647 seconds
May  8 18:25:35 unknown SpringBoard[54] <Warning>: Application 'Test' exited abnormally with signal 9: Killed: 9
May  8 18:25:36 unknown kernel[0] <Debug>: AMFI: hook..execve() killing pid 1017: no code signature

Why are all my applications crashing in the iPhone when they run fine in the simulator?

Thanks /Tim

3
did you see this thread stackoverflow.com/questions/9898039/…Vin
Missed that thread, I'll try it. Thanks!Kersch
Done all steps now, edited the plist, jailbreaked my iPhone and I can install the app to my iPhone without code signing. But when I try to start the app It crashes at launch. I'm not even able to se the launch image. It runs fine in the simulator and i've tried with other apps. Do you know what the problem might be?Kersch
did you see the crash logs for the device?Vin
I'll edit the question so you can se it there. The content won't fit in the comment.Kersch

3 Answers

11
votes

I've had exactly the same problem as you, getting apps running on iOS 5.1 with Xcode 4.3.2 and I've just managed to get it working almost perfectly using this method here:

Building Apps for iOS 5.1 with Xcode 4.3.2

It's based on this one from iPhone Dev wiki, but I had to include some alterations - the -gta switch results in a build error, and the instructions aren't exactly explicit. The complete tutorial is in that blog post, but the steps basically are:

  1. Create self-signed certificate with name 'iPhone Developer'
  2. Turn 'Code Signing Identities' in Xcode project Build Settings back on - to use your self-signed certificate 'iPhone Developer'
  3. Change info.plist occurrences as stated
  4. Download ldid, make executable
  5. Create python script, stick it in /usr/bin, change python script references accordingly
  6. Change iPhoneCodeSign.xcspec to use ldid3.py
  7. Create tdmtanf file on device with touch over ssh
  8. Don't put -gta flags in 'Other Code Signing Flags'

I happen to use Unity for debugging so the lack of Xcode debugging with -gta didn't bother me - obviously Objective C developers will need this functionality, so hopefully someone can expand on this if they get it working. I'm currently playing with a dev build of my app on my iPhone on 5.1, and fingers cross you can get the same result.

1
votes

I don't know if you resolve your problem but I had the same that you had. I'll explain how solve.

Require:

Xcode 4.3.2, iPhone with iOS 5.1.x, Mac.

All you need is auto sign your application. All steps that you did are corrects, so when you have your application builded from Xcode you need to sign it. Create a self certificate in keychain and then go in the folder (by terminal) where xcode compile the application, then write this:

mac$ platform=/Developer/Platforms/iPhoneOS.platform
mac$ allocate=${platform}/Developer/usr/bin/codesign_allocate
mac$ export CODESIGN_ALLOCATE=${allocate}
mac$ codesign -fs "Name" Program

where "Name" is the name of the certificate and Program is the name the Program.app (you must specify .app). The copy your app in /Applications by ssh or cyberduck or iTunes... Then respring and enjoy!

1
votes

I was trying to do the same and had failed at a few points, then I found Moustafa Hassan's blog, which had the steps I successfully used.

It works fine testing with Xcode 4.6.3 on OS X 10.8.4 (on my Hackintosh) and iOS 6.1.2 on my iPad

That page contained step by step examples and pictures to do the job. It only takes about 15 minutes.

The only thing I can think of that is not listed on the page is how to access /usr/local/bin on your OS X device. That is easily done by showing hidden files in terminal[1].

[1]: defaults write com.apple.Finder AppleShowAllFiles YES