Signing Code = iphone 2.0 Toolchain (CYDIA)

Discussion in 'iOS Development' started by bones237, Aug 16, 2008.

  1. bones237

    bones237 New Member

    Joined:
    Feb 17, 2008
    Messages:
    101
    Likes Received:
    7
    Device:
    iPhone 3G (White)
    Help!!!
    I've made two starter apps, albeit 'Hello World'-type apps, and they compile fine using the iphone toolchain from Cydia but when I launch them from the Springboard, they hang up on the Default.png for maybe 2-3 seconds and then crashes right back to Springboard. I don't think it's my code or makefile cuz in my effort to troubleshoot the problem, I downloaded Skylar's sample app, HERE (Post #17), which if I put his app in with his compiled binary, everything works fine but when I take his source files and makefile and compile my own binary, it compiles but the same thing happens as with my apps (they launch but crash after 2-3 seconds). Maybe, the code signing process is not working correct or is it something else?? I'm still somewhat a beginner so I might be looking right at it

    Can someone please tell him how to go about exactly signing my code. I've executed
    Code:
    ldid -S (Program)
    in my makefile but does the sign tool come with the toolchain or is that something separate I need to install.

    Ive worked a little bit with the Apple SDK using InterfaceBuilder, but I'm trying to learn to write code from scrap without using IB and I was told the Cydia toolchain is the best option right now until a complete 2.0 toolchain is made for mac/pc (or is there one already??)
  2. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    If you compild skylar's application, you will need to perform the code differences in 2.0 toolchain code. for info, see my "building your first 2.x application" thread in this section, and also try compiling and signing "http://a27dev.com/objc/SimpleWindowApp.zip".


    EDIT: Also, consider building a full, real toolchain on linux or mac. http://saurik.com/id/4
  3. hobofan

    hobofan New Member

    Joined:
    Jun 1, 2008
    Messages:
    68
    Likes Received:
    0
    the signing tool comes with the toolchain I think(it worked after downloading it through cydia.

    my makefile looks like this:
    I think that all bold Words have to be the same, so this could be the problem
  4. Spreche

    Spreche Member

    Joined:
    Dec 27, 2007
    Messages:
    164
    Likes Received:
    0
    Device:
    iPhone
    Look at your compile log. Near the very end or somewhere in the log should be a line like this:
    Code:
    ldid -S "AppName"
    chmod 0755 "AppName"
    
    I think it means it has been successfully signed. The second line makes the executable's permissions to 0755. What I would do is check to see if your Info.plist is correct and all permissions are set to 0755
  5. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    wow way to steal my makefile. watever. still, your code needs to be changed
  6. bones237

    bones237 New Member

    Joined:
    Feb 17, 2008
    Messages:
    101
    Likes Received:
    7
    Device:
    iPhone 3G (White)
    ok, i think i figured it out. I think it was the template that I was using in Xcode. like I stated earlier, i've used the apple SDK before so I have the iPhoneOS app templates in Xcode and i was using that to write my app then just save the source to my desktop, then go from there with the cydia toolchain. i guess that's a no no. i rewrote the source files using a regular text editor and everything works now. (app compiles and runs

    Please Register or Log in to view images

    )

    does anyone know what template to use in Xcode so that when i'm done, i can just drag and drop the source files to my desktop to use with cydia gcc??
    I like using Xcode and don't want to have to switch to a text editor.
    I was using the 'Window-based application' template under iPhoneOS

    EDIT:
    if anyone cares, i figured out to use Xcode. When creating new project, choose window-based application under iphoneOS but don't use the " **AppDelegate.h, **AppDelegate.m" files (that's what I did and it didnt work with cydia toolchain). Instead just make a new obj-c class and use those files. they work if u drag to desktop and compile with cydia gcc.

    I used Skylar's sample 2.0 app so he already made the changes and his binary ran fine on my 2.0 ipod Touch but my binary of his app didn't.
    Also, just to let u know, I tried compiling ur source that u have for ur apps in link in ur sig but it doesn't compile. (namely the Yes/No app) did u know that? You're missing some square brackets in 'YesOrNo.m' I had to add them in ur if statement to get it to compile
  7. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    i post the very source i use for my apps. but maybe i did make some modifications that i didn't upload. and now that im lookint you're right. where i chose the UIImage. good eye.

Share This Page