Install iOS Apps on device without developer program, iOS 5.1
Asked Answered
F

3

17

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

Formal answered 8/5, 2012 at 7:26 Comment(7)
did you see this thread #9898539Baud
Missed that thread, I'll try it. Thanks!Formal
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?Formal
did you see the crash logs for the device?Baud
I'll edit the question so you can se it there. The content won't fit in the comment.Formal
I've posted the consoles output when I try to start the app.Formal
I'm experiencing the same issue here, it's definitely related to the code signing.Cotto
L
11

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.

Lyricism answered 26/5, 2012 at 3:55 Comment(6)
I managed to get it working your way. Your step 5 is confusing. I had to place ldid into /usr/bin/ldid and change ldid3.py accordingly (line 12 and 24).Cotto
Yeah I had a bit of trouble with ldid3.py losing its executable permission flag, so one might have more luck following the wiki link's steps and putting it and ldid in /usr/local/bin. Also, it appears that iDevices will refuse to run apps built with very recent SDKs even if the above steps are followed - if I selected inside Unity (game engine/editor) to build with iOS 5.1 SDK, the app would crash instantly once tapped on, and Xcode would report the original post's error message in the console (exited abnormally... no code signature). I finally got it working once I built with iOS SDK 4.2.Lyricism
@Lyricism ldid and ldid3.py work fine under /usr/bin/ with chmod +x /usr/bin/ldid etc... to set the permissions.Cotto
i tried everything you suggested, but still running into this error: can't exec 'usr/bin/ldid3.py' (Operation not permitted). Any solutions?Fotheringhay
this solution by "Sin" helped: use the command “xattr -d com.apple.quarantine /usr/local/bin/ldid3.py” to fix it. Thank you very much!!!Fotheringhay
To get debugging to work simply add f.flush() after the f.write(...) line in the python script. This will write the plist to disk. Hope that helps.Goldwin
D
1

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!

Disarm answered 18/5, 2012 at 6:26 Comment(1)
No I did not resolve the problem. I'll try your solution. Thanks!Formal
C
1

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

Cathrin answered 29/7, 2013 at 13:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.