Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attempting to deploy my app on my jailbroken iphone, but the app closes immediately!

I'm trying to develop iphone apps on my jailbroken iphone, and I can't seem to get the process down, for whenever I deploy my app, set all file permissions to 777, and respring, the application closes immediately when I try to launch it. Furthermore, it does not have the auto-gloss xcode shows in the iphone simulator, so what gives?

I've generated the cert via keychain access and added the two keys for REQUIREPROVISIONING and ALLOWPROVISIONING (both values no), and then set the appropriate cert in xcode, but the application still closes immediately when I attempt to run it on my phone.

What gives?

like image 309
Stefan Kendall Avatar asked Aug 17 '09 02:08

Stefan Kendall


2 Answers

I had the same issue, ldid did not work for me at all. Here's my solution:

  1. Open Keychain Access on the Mac
  2. In the menu, go to "Keychain Access -> Certificate Assistant -> Create a Certification"
  3. Name it "Cydia Developer" or whatever, type is "self-signed root" and check "let me override defaults".
  4. The only option you need to set in the wizard is to change Certificate Type to "Code Signing". Click continue or enter your desired info for the rest.
  5. Once it's created, find it in Keychain Access's Certificates list and right click -> Get Info, under Trust change "When Using This Cert" to "Always Trust".
  6. Write an iPhone app in XCode. Change "Project->Project Settings->Build->Code Signing Ident->Any iPhone Device" to "Don't Code Sign".
  7. Compile the program with the Active SDK set for "iPhone Device" instead of "Simulator". Ignore the errors about provisioning or signing.
  8. Under "Executables", drag the newly compiled app to somewhere that is easy to get to from the terminal.
  9. In a terminal, run 'codesign -fs "Cydia Developer" /path/appname.app/appname'
  10. Somehow get your app to the phone (ssh, cydia, teleportation, whatever) and viola! Working app.

To deploy with an Apple devel key, just set your project build code sign identity to the name of the Apple dev key name instead of "Don't code sign".

like image 104
GregH Avatar answered Sep 28 '22 07:09

GregH


Did you sign your app? I'm not sure if this is needed for Xcode apps, but to run Jailbreak-toolchain compiled apps you have to run ldid -S (as root) on the app executable (ex. MyApp.app/MyApp). This Thread may help: Thread

like image 40
kersny Avatar answered Sep 28 '22 07:09

kersny