Previous 1 2 3 Next 64 Replies Latest reply: May 19, 2009 8:11 PM by the other mcintosh
Dev123456 Level 1 (0 points)
I have been using the iPhone SDK and the app. runs on the sim, but it will not allow me to test it on the device. I get an CodeSign Error. How do apply the Developer cert.?

iPhone, Mac OS X (10.5.2)
  • Earless Puppy Level 4 (1,905 points)
  • Dev123456 Level 1 (0 points)
    Yes, did that already. My question is, where is the cert. and how do I apply it?
  • MobileDev Level 3 (565 points)
    No one has publicly (and believably) said that they have gotten a certificate yet.

    So you're not alone in waiting.
  • Paul Dolce Level 1 (0 points)
    I got my certificate, followed the instructions to make Xcode use it, and I still get a codesign error:

    <pre> object file format invalid or unsuitable</pre>
  • Dev123456 Level 1 (0 points)
    Where on the web site did you upload the cert. request and how did you upgrade the device OS to 2.0?
  • Saurabh Garg Level 1 (20 points)
    Pretty sure discussing this on here violates the license. It's fairly easy to get it working if you follow instructions closely. Else, just put those $99 to good use, and email ADC engineers to help you out. If you recall, acceptance into the program guarantees you code level support from Apple engineers.

  • Clavius Level 1 (0 points)
    Any info about how best to contact ADC engineers regarding this issue? I could not find any links on the iPhone portal page. I am encountering mixed results when I codesign and test against my device (I'm in the program, I have certs, they appear in KeyChain, etc.)

  • Paul Dolce Level 1 (0 points)
    Yeah, we have spent the $99 and have been accepted into the program. I have my certs, they're in my keychain, my project is setup seemingly correctly. There's nothing on the iPhone dev site that says, "contact Apple engineers about the beta program", just the generic "contact us" links.

    I'm surprised they don't have support forums dedicated to this. I have lots of feedback...who do I email? I was contacted by someone from Apple regarding the I just send feedback to that person?

    As for asking for help...I'm trying this on a PPC Powerbook, so I doubt they'd help anyway since that platform is not "officially" supported. That's why I'm curious if anyone else has had issues with the codesigning build phase of their iPhone projects. I'm just looking for someone to say, "yeah it works fine on my Mac", or "I had the same issue, contact Apple and they'll work through the issue with you". If nobody else has experienced the same issue, I can prolly assume it's a platform problem.

    I don't want anyone to divulge anything covered by the NDA...just let me know if I'm alone with my issue or not.
  • Avatron Level 1 (70 points)
    If you have feedback, you should use Radar. Apple Engineers don't get assigned tasks unless they are filed in Radar. So got to <> and have at it.

    Dave Howell
    Avatron Software
  • varjak paw Level 10 (169,822 points)
    You need to be working on the officially supported platform. Though I cannot say for sure, I'm pretty certain that there are portions of the development and build for the iPhone that are not PowerPC and so will not work on a PowerBook. This is quite likely at least part of the problem you're experiencing. Apple developer support definitely will not help you work out a problem like this when you're not working on the platform they require.
  • Pete Art Level 1 (0 points)
    Hi Paul,

    i got the same problem with my G4 PPC, everything in place and still codesign says "object file format invalid or unsuitable"...

    Did you figure it out?

  • darwin24 Level 1 (0 points)
    Hi Paul,

    Just letting you know that I am on a PowerBook G4 and have followed everything regarding the codesigning and I get the "object file format invalid or unsuitable" error.
  • shinyformica Level 1 (0 points)
    Same issue for me. I've been waiting till the next revision of the MacBook Pros before spending a significant amount on an intel mac, but I still wanted to try developing for the iPhone.

    Everything works except for the codesign step. Code compiles, links, works in the simulator, etc.

    Anyone know why codesign won't work on PowerPC hardware? I know it isn't officially supported for iPhone development, but I'd still love to be able to play around before I make the move to intel, since that's still a couple months off, at least.
  • Tiku Level 1 (0 points)
    The trick seems to be to convert the thin binary into universal binary and then signing it and then returning it back to thin again (although the phone will actually run universal binaries, but thin is a bit smaller). Converting binaries to universal and back with lipo will not break the code signing!

    If you feel adventurous, this is how I managed to get it working:
    mv /usr/bin/codesign /usr/bin/codesign.orig
    Then with you favorite editor create a new /usr/bin/codesign with following contents:

    for($b=0;$b<$#ARGV;$b++) {
    if($ARGV\[$b] eq "-s") {

    $mums=`file $realAppName`;
    if($sign==1 && $mums=~/executable arm/) {
    #print "Signing armv6..\n";
    `$dev/lipo -create $realAppName -output $tmp`;
    `mv $tmp $realAppName`;
    `$dev/lipo -thin armv6 $realAppName -output $tmp`;
    `mv $tmp $realAppName`;
    system("rm $appDir"."/CodeResources");
    system("cp $appDir"."/_CodeSignature/CodeResources $appDir"."/CodeResources");
    exit 0;
    } else {
    exec '/usr/bin/codesign.orig',@ARGV;

    Someone with actual perl/sh skills might want to rewrite whole thing :P (and can't figure out how to get identation working, so try to fix them yourself)

    Only mysterious part is the CodeResources symbolic link, it will not upload itself into the device (instant error 0xe8000001, that kept me awake for some time), that's why I've removed it and copied the CodeResources from _CodeSignature.
Previous 1 2 3 Next