Trying to extract headers from iPhoneSDKHeadersAndLibs

Discussion in 'iOS Development' started by meyerovb, Feb 8, 2009.

  1. meyerovb

    meyerovb New Member

    Joined:
    Feb 6, 2009
    Messages:
    25
    Likes Received:
    0
    I'm following the directions from here: http://www.theiphonewiki.com/wiki/index.php?title=Toolchain_2.0

    I want to see whats a available to me in the iPhone sdk, I've gotten to the point of getting the iPhoneSDKHeadersAndLibs.pkg file, compiling xar on cydia, but when I run "xar -xf iPhoneSDKHeadersAndLibs.pkg Payload", cydia crashes, saying error in xar.exe (error is appcrash). I've been up all night trying to get this to work (been a LONG time since I've used Cydia...)

    What am I doing wrong? Where can I get those header files so I can see what functionality is available to me?
  2. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    If you're using your phone, then undo everything you've done so far, and just download the toolchain via Cydia. The toolchain has been built and precompiled so that all anyone has to do is download the package and they're done.
  3. meyerovb

    meyerovb New Member

    Joined:
    Feb 6, 2009
    Messages:
    25
    Likes Received:
    0
    That won't give me the iphone api that I can use when programming for mobile substrate.

    Note how Backgrounder imports SpringBoard/SpringBoard.h in SpringBoardHooks.mm
    http://code.google.com/p/iphone-backgrounder/source/browse/trunk/Classes/SpringBoardHooks.mm

    I'm guessing this is from the iPhone sdk that doesnt come down with the toolchain, but needs to be manually copied into it by following the directions in my original post. I just want to see these files somehow but I can't with windows because xar isn't working with cygwin.
  4. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Everything in there with the exception of the SpringBoard headers come with the toolkit. Install it.

    To get the SpringBoard headers, you will need to class dump SpringBoard. No one distributes those, as that would be a violation of the DMCA.
  5. meyerovb

    meyerovb New Member

    Joined:
    Feb 6, 2009
    Messages:
    25
    Likes Received:
    0
    I followed this post to try to get the class-dump for springboard
    http://www.ifans.com/forums/showthread.php?p=965723

    It told me to go to this page to extract the iPhone sdk package in order to class dump it
    http://www.theiphonewiki.com/wiki/i...Phone_OS_2.0_Installation_Packages_.28.pkg.29

    I followed those directions until xar failed on cygwin. So I can't get the framework headers, so I can't class-dump the springboard. I could run a mac or linux vm, but all I want to do is see those files so I can get a feel for it. Any advice?
  6. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    No.

    To class-dump SpringBoard:
    1. Download class-dump from within Cydia
    2. enter this command in either terminal on your device, or your favorite SSH client:
      • mkdir -p /tmp/classes/SpringBoard; class-dump -H /System/Library/CoreServices/SpringBoard.app/SpringBoard -o /tmp/classes/SpringBoard
  7. meyerovb

    meyerovb New Member

    Joined:
    Feb 6, 2009
    Messages:
    25
    Likes Received:
    0
    Thanks, I ran that command after installing terminal and class-dump on my iphone and was able to get the header files for springboard, and I did it with MobileMail too (hoping to somehow execute fetchNow... gmail push come true, but thats for another thread). Thanks for the method. However, I still want to get the rest of the iPhone SDK headers, which I'm assuming I can tie into through Mobile Substrate.
  8. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    If you want the rest of the headers, download the toolchain from Cydia.
  9. meyerovb

    meyerovb New Member

    Joined:
    Feb 6, 2009
    Messages:
    25
    Likes Received:
    0
    Ok, so the ToolChain 2.0 in Cydia places ALL the iPhone SDK headers in the /var/include directory? I don't need to manually extract iPhoneSDKHeadersAndLibs.pkg from the iPhone sdk I downloaded from apple?
    ------------------double post merged------------------
    Thanks for your help Skylar, sorry for the newbie misunderstanding. After futzing with it for a few days now I've come to the realization that even if I could understand all the sdks, I'm a .NET developer, and definitely don't have the c skills to write a bug free mobile substrate extension. I'll stick to asking for features from the pros, cause I'm tired of sleepless nights, lol. In the meantime, I'm off to the lesser evil world of WinterBoard themes and trying to decrypt apple's new webkit css stuff. Thanks for the help!

Share This Page