views:

3642

answers:

3

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?

+1  A: 

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

kersny
This did not resolve the issue.
Stefan Kendall
+3  A: 

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".

fonik
Ooo, I'll try this!
Stefan Kendall
How do I ignore the errors about signing? Xcode claims that I MUST codesign for type "Application" in SDK 'Device-...Help?
Stefan Kendall
For me with XCode 3.1.3, when I build it, it builds and then displays the errors. I'll check to see if it was something else I did.
fonik
One of the other things I did beforehand was to apply this patch to XCode to try to get it to deploy to the device directly from XCode, but I'm not sure if it's related. I've tried reverting all other changes I made and I'm still able to build.http://www.iphonedevsdk.com/forum/iphone-sdk-tools-utilities/20983-sdk-3-0-xcode-3-1-3-build-go-jailbroken-device-2.html
fonik
Here's how to silence "must codesign" error in latest XCode: http://thebigboss.org/hosting-repository/submit-your-app/compile-for-cydia-submission
DenNukem
This answer worked for me on XCode 3.2.3 and iOS 3.1.2. I had to use the bigboss link above to remove the signing requirement from XCode. Kudos to fonik.
DenNukem
A: 

For Step 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".

I am not able to save the setting "Always Trust" ... once I close the window, it resets back to "Use System Defaults" ... Does anybody else face this problem? What am I missing here?

Dev