Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ozzapoo

macrumors newbie
Original poster
Feb 14, 2009
6
0
Hi. I have built an iPhone app which can run on the simulator without problems, but I wish to run it on my jailbroken iPhone. Is this possible?

I tried to move it into /Applications, chmodded it and used ldid, but it just opened quickly and closed in a flash. Are there other changes I have to do to get it to run on the iPhone?
 
Have you recompiled it for the correct architecture? The simulator is running on your Mac so uses x86 binaries. The phone needs ARM binaries.
 
Have you recompiled it for the correct architecture? The simulator is running on your Mac so uses x86 binaries. The phone needs ARM binaries.

So, because I'm building it specifically to test on iPhone Simulator it won't work? Is there any way to convert it to ARM binaries? I can't directly compile it with ARM.
 
So, because I'm building it specifically to test on iPhone Simulator it won't work? Is there any way to convert it to ARM binaries? I can't directly compile it with ARM.

You cannot "convert" Intel to ARM at a binary level. You need to recompile it. Normally you do this in XCode by changing from Simulator to Device. If you can't do that for some reason I suggest you ask on a forum with lots of Jailbrake developers: most of the developers on here are using the official SDK to compile for the app store so this is not an issue.
 
I just tried running it through shell and got this:

-sh: ./iPhoneHelloWorld: Bad CPU type in executable
Does that mean it's definitely the wrong architecture?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.