[Xcode Template] MobileSubstrate Dylib Template for Xcode

Discussion in 'iOS Development' started by SkylarEC, Mar 23, 2009.

  1. SkylarEC Super Moderator Emeritus

    Member Since:
    Sep 19, 2007
    Message Count:
    6,640
    Why not just remove the #import "UIModalView.h" and use an @class UIModalView instead?
  2. goldingname New Member

    Member Since:
    May 11, 2008
    Message Count:
    4
    I really appreciate your help, I've managed to change imports from <> to ""(surprisingly didn't take that much time :D) and used drag and drop to add them to my project, everything works great now.

    BTW, I tried it and this is what I got

    Code:
    error: cannot find interface declaration for 'UIModalView', superclass of 'SBAwayItemsView' 
    because of this:
    Code:
    @interface SBAwayItemsView : UIModalView
    {
        NSArray *_displayedItems;
        float _widestLabel;
    }
    Since my problem is solved already, I don't think we need to discuss it anymore.

    Thanks again
  3. Gi-lo Member

    Member Since:
    Jul 11, 2008
    Message Count:
    139
    I got this error while compiling the template:

    Any solutions ?
  4. cwe7976 New Member

    Member Since:
    Oct 4, 2007
    Message Count:
    10
    I am getting the same error that was previously described by Raisen. I have the class-dump and libsubstrate.dylib in the correct locations.

    I am trying to build on an iPhone w/ 3.1 on it.

    What do I need do to get XCode to realize that libsubstrate.dylib does in fact exist? Do I need to do anything in XCode itself other than open the download, code sign it and hit compile?

    ----------------------Original Post------------------------
    I followed all the steps, class dumped SprinBoard, copied to the appropriate folders of SDK 3.0 but somehow, when I try to build, xcode gives me 17 errors

    Line Location Test_MS.mm:16: error: substrate.h: No such file or directory
    Line Location Test_MS.mm:18: error: SpringBoard/SpringBoard.h: No such file or directory
    Line Location Test_MS.mm:37: error: variable or field '$SpringBoard$applicationDidFinishLaunching$' declared void
    Line Location Test_MS.mm:37: error: 'app' was not declared in this scope
    (...)

    Well, the first two lines probably tell everything. I don't know why xCode can't find those files.

    substrate.h and SpringBoard/ header fiels are under /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/

    I also copied libsubstrate.dylib from my iPhone to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib
  5. phor2zero New Member

    Member Since:
    Sep 30, 2009
    Message Count:
    1
    Device:
    iPhone 3GS (Black)
    @cwe7976

    This was actually quite a bit of work to get going. I've been able to successfully build SpringJumps (Just the MS plugin part - I haven't started on the preferences app yet.)

    In project settings > build configuration I added my 3.0 open-toolchain headers include directory as an additional header search path. That solved "most" of the missing header errors. There were a couple of SpringBoard headers I had to copy into foundation.framework headers folder as well.

    I adapted a copy of the default main.m file from the default Xcode "Open-Toolchain App" template and added it to the SpringJumps project, because I was getting a linker error, looking for main.m. I solved the 29 OBJC2_UNSUPPORTED errors by simply commenting out all the offending code in the relevant header file. (I wonder when this will bite me back?)

    The compile was only successful in base 3.0 SDK in Release mode.

    My next step will be to compile in Debug mode on the simulator and then I'll need to get MobileSubstrate compiled and installed into the iPhone Simulator, so I can start working on plugins there.

    In retrospect - I'm not sure how much help this template actually was in my first successful 3.0 open-toolchain iPhone compile in Xcode 3.2. By the time I was done, there wasn't much evidence left of the template. In any case, the OP instructions got me started, and I feel like it helped a whole bunch!

    Thanks a lot.
    phor2zero

    PS - look forward to the day you see apps on Cydia with the bundle name -
    sw.phor2zero.appname ;-/
  6. SkylarEC Super Moderator Emeritus

    Member Since:
    Sep 19, 2007
    Message Count:
    6,640
    phor2zero, this is interesting because I had no issues with headers/etc. Nor did anyone who tested this before release.

    I'd be curious in differences in set up. I have done literally nothing after installing Xcode to do this (other than the instructions in the opening post). I still have no issues with this template (nor do most others).



    Gilo, this error ""_testInitialize", referenced from:"_testInitialize", referenced from:" indicates that the linker can not find your initialization method. Make sure everything in your build settigns and source code matches up.
  7. Charybdis New Member

    Member Since:
    Oct 4, 2009
    Message Count:
    2
    Device:
    iPhone 3G (Black)
    It's interesting that you post this, I recall a few months ago you really seemed against telling the world about Mobile Substrate plugins. (http://www.ifans.com/forums/showpost.php?p=966995&postcount=13)
    Have you changed your mind?

    Personally I'm really glad you're doing this and that you've been writing all these tutorials recently. I've found them very helpful and hope that you continue. You clearly know what you're doing, and the community needs more people like you to share the knowledge.

    Thanks!
    Charybdis
  8. SkylarEC Super Moderator Emeritus

    Member Since:
    Sep 19, 2007
    Message Count:
    6,640
    Nope. I am still against MS plugins. And I am still against people making them. I feel if it can't be done by an app, it shouldn't be done. Exceptions exist for such things as theming the OS and whatnot.
  9. Steaps New Member

    Member Since:
    Oct 24, 2007
    Message Count:
    5,075
    Device:
    iPod touch
    Exposé (Orbit)? Spaces?
    I'm not jailbroken 100% for the reason of MS, but some of the things people can do are awesome. And by people, i mean Steven Troughton-Smith.
  10. SkylarEC Super Moderator Emeritus

    Member Since:
    Sep 19, 2007
    Message Count:
    6,640
    Orbit is worthless.