Check out our new iPad forum.
iPod touch 3G deals: 8GB $183.99, 32GB $269.99, 64GB $357.00 with free shipping

Go Back   iPod touch Fans forum > iPod touch / iPhone Developers > Toolchain and SDK Development

Reply
 
Thread Tools
  #1  
Old 08-16-2008
bones237's Avatar
iPod touch Fan
Join Date: Feb 2008
 
Default Signing Code = iphone 2.0 Toolchain (CYDIA)

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  
Old 08-16-2008
gojohnnyboi's Avatar
iPod touch Zealot
Join Date: Jan 2008
 
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  
Old 08-16-2008
iPod touch Admirer
Join Date: Jun 2008
 
the signing tool comes with the toolchain I think(it worked after downloading it through cydia.

my makefile looks like this:
Quote:
CC=arm-apple-darwin9-gcc
LD=$(CC)
LDFLAGS= -lobjc \
-framework UIKit \
-framework Foundation \
-framework CoreFoundation \
-framework CoreGraphics \
-L"/usr/lib" \
-F"/System/Library/Frameworks" \
-F"/System/Library/PrivateFrameworks" \
-bind_at_load \
-multiply_defined suppress
CFLAGS=-I/var/include -redefined_supress
App=MobileCoding

all: $(App)

$(App): main.o MobileCoding.o
$(LD) $(LDFLAGS) -o $@ $^
ldid -S $(App)


%.o: %.m
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

clean:
rm -f *.o $(App)
I think that all bold Words have to be the same, so this could be the problem
  #4  
Old 08-16-2008
iPod touch Fan
Join Date: Dec 2007
 
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  
Old 08-16-2008
gojohnnyboi's Avatar
iPod touch Zealot
Join Date: Jan 2008
 
Quote:
Originally Posted by hobofan View Post
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
wow way to steal my makefile. watever. still, your code needs to be changed
  #6  
Old 08-16-2008
bones237's Avatar
iPod touch Fan
Join Date: Feb 2008
 
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 )

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.

Quote:
Originally Posted by gojohnnyboi View Post
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".
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

Last edited by bones237; 08-16-2008 at 05:11 PM..
  #7  
Old 08-16-2008
gojohnnyboi's Avatar
iPod touch Zealot
Join Date: Jan 2008
 
Quote:
Originally Posted by bones237 View Post
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 )

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 09:27 AM.


Sort of vBulletin-powered
Copyright 2007 - 2010 Vigorous Media LLC - All Rights Reserved.


Page generated in 0.04298 seconds with 7 queries