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

endoscient

macrumors member
Original poster
Jun 3, 2005
38
0
I just jailbreaked my new iPhone 3G, and I have an application I wrote with the iPhone SDK that I would like to get on my iPhone. I am not "enrolled" in the developer program so I can't get it on with official means. I installed SSH and tried copying the compiled .app file to /Applications with no success. It will show the application in SpringBoard but will crash before loading. Any ideas?

Also the application I made I compiled on my PPC mac, not sure if that will make a difference.
 
im in the same boat but i have 3 apps that i have written and would love to get on the iphone for personal use. any info on this would be greatly appreciated.

p.s. i have jailbroken 3g
 
You have to pay $99 for Xcode to cross compile them for ARM. Otherwise it just compiles them for the iPhone simulator which I think is Intel or PPC.
 
You have to pay $99 for Xcode to cross compile them for ARM. Otherwise it just compiles them for the iPhone simulator which I think is Intel or PPC.

What about Cylia? Was that compiled with the full version of iPhone SDK? Or what did people do to compile for 1.1 Jailbreak.
 
What about Cylia? Was that compiled with the full version of iPhone SDK? Or what did people do to compile for 1.1 Jailbreak.

Cydia wasn't made with the iPhone SDK. It was made with the unofficial toolchain.

Not sure what you mean "1.1 jailbreak" ...
 
Cydia wasn't made with the iPhone SDK. It was made with the unofficial toolchain.

Not sure what you mean "1.1 jailbreak" ...

If I go to Project menu and Set Architecture it has armv6 selected. And Active SDK it is Device selected. So it seems like it is compiling an arm version.
 
ok this is where im at
looking here /Users/**your computer name**/Library/Application Support/iPhone Simulator/User/Applications/
and comparing to one i got off the iphone via ssh from here / var/mobile/Applications/
there are 2 things missing. a folder in the .app named SC_Info which contains two files *.sinf and *.supp. from what i read these are the same for all programs so a quick copy and rename got these for my app. here's the problem there is a folder called _CodeSignature that contains a .plist called CodeResources that i have no clue how to create. i believe if we can somehow recreate this along with the generic *.sinf and *.supp we can figure this out and have our own apps on the iphone.
 
is a screenshot of the CodeResources.plist
my.php
 
You also should read the FAQ that comes with Cydia. It mentions that all applications need to have a SHA1 checksum included, and it tells you how to generate it and attach it to the application. The OS will kill applications without the checksum or if it's mismatched.
 
I followed the instructions of the Cydia-FAQ, which states:
"Question: Whenever I run programs I compile with your toolchain, they are immediatley "Killed".
Answer:The new iPhoneOs only wants to run signed code. This was mostly fixed by some kernel patches added by PwanageTool, but you still need to at least add a valid CodeDirectory to the binary that contains SHA1 hashes of the executable. This is done using the developer tool ldid.
Code:
$ apt-get install ldid
$ gcc -o program program.c
$ ldid -S program
$ ./program
"

But when I try to install ldid apt complains:
Code:
iphone:~ root# apt-get install ldid
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  odcctools
The following NEW packages will be installed:
  ldid odcctools
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 2203kB of archives.
After unpacking 6017kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://apt.saurik.com tangelo/main odcctools 252-4 [2178kB]
Get:2 http://apt.saurik.com tangelo/main ldid 1.0.363-1 [25.3kB]                                                                                                                  
Fetched 2203kB in 14s (152kB/s)                                                                                                                                                   
Selecting previously deselected package odcctools.
(Reading database ... 1295 files and directories currently installed.)
Unpacking odcctools (from .../odcctools_252-4_iphoneos-arm.deb) ...
Selecting previously deselected package ldid.
Unpacking ldid (from .../ldid_1.0.363-1_iphoneos-arm.deb) ...
Setting up odcctools (252-4) ...
Setting up ldid (1.0.363-1) ...
W: Couldn't stat source package list http://repo.smxy.org xena/main Packages (/var/lib/apt/lists/repo.smxy.org_cydia_apt_dists_xena_main_binary-iphoneos-arm_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
iphone:~ root#
 
I followed the instructions of the Cydia-FAQ, which states:
"Question: Whenever I run programs I compile with your toolchain, they are immediatley "Killed".
Answer:The new iPhoneOs only wants to run signed code. This was mostly fixed by some kernel patches added by PwanageTool, but you still need to at least add a valid CodeDirectory to the binary that contains SHA1 hashes of the executable. This is done using the developer tool ldid.
Code:
$ apt-get install ldid
$ gcc -o program program.c
$ ldid -S program
$ ./program
"

But when I try to install ldid apt complains:
Code:
iphone:~ root# apt-get install ldid
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  odcctools
The following NEW packages will be installed:
  ldid odcctools
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 2203kB of archives.
After unpacking 6017kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://apt.saurik.com tangelo/main odcctools 252-4 [2178kB]
Get:2 http://apt.saurik.com tangelo/main ldid 1.0.363-1 [25.3kB]                                                                                                                  
Fetched 2203kB in 14s (152kB/s)                                                                                                                                                   
Selecting previously deselected package odcctools.
(Reading database ... 1295 files and directories currently installed.)
Unpacking odcctools (from .../odcctools_252-4_iphoneos-arm.deb) ...
Selecting previously deselected package ldid.
Unpacking ldid (from .../ldid_1.0.363-1_iphoneos-arm.deb) ...
Setting up odcctools (252-4) ...
Setting up ldid (1.0.363-1) ...
W: Couldn't stat source package list http://repo.smxy.org xena/main Packages (/var/lib/apt/lists/repo.smxy.org_cydia_apt_dists_xena_main_binary-iphoneos-arm_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
iphone:~ root#

Ya, I read that too, and tried to install ldid. I got the same error, but it seems like ldid was installed regardless, though maybe not in full working state. But I tried to do it anyway, but I got this:

Fang:/Applications/MyApp.app root# ldid -S MyApp
codesign_allocate: object: MyApp malformed object (unknown load command 9)
util/ldid.cpp(431): _assert(0:WEXITSTATUS(status) == 0)


I also tried copying the Simulator version of the app to /var/private/mobile/Applications where all the other App Store applications are located, and just replace the .app file with iPhoneOS built one. But no luck, when I try to launch I get a popup say "The application cannot be opened".
 
I also tried copying the Simulator version of the app to /var/private/mobile/Applications where all the other App Store applications are located, and just replace the .app file with iPhoneOS built one. But no luck, when I try to launch I get a popup say "The application cannot be opened".

That's because the iPhone simulator isn't arm.
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5A347 Safari/525.20)

The General said:
I also tried copying the Simulator version of the app to /var/private/mobile/Applications where all the other App Store applications are located, and just replace the .app file with iPhoneOS built one. But no luck, when I try to launch I get a popup say "The application cannot be opened".

That's because the iPhone simulator isn't arm.

That is why I said I copied the .app file that was compiled for iPhone OS and only using the directory structure from simulator.
 
I would head to hackint0sh.org for developer talk as that is the best place for complicated issues!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.