Welcome to the iFans Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!

What is mobile substrate?

Discussion in 'iPod touch Firmware 2.X' started by Zee, Oct 4, 2008.

Thread Status:
Not open for further replies.
  1. Zee

    Zee Member

    Joined:
    Oct 11, 2007
    Messages:
    635
    Likes Received:
    2
    Device:
    iPhone 4 (Black)
    Can someone explain to me how this works? I've seen it referenced in applications now how they are using mobile substrate. How exactly does it work with apps?
  2. Gitykins

    Gitykins Banned

    Joined:
    May 16, 2008
    Messages:
    3,891
    Likes Received:
    1
    Some apps (Stacks, many of gjb's apps, five icon dock. WinterBoard) run code on the SpringBoard, so if any of it crashes, you're pretty much screwed. But, MobileSubstrate is a failsafe "SpringBoard.app" that will run in case of a SpringBoard crash. This saves you from SWOD's, etc, by temporarily disabling the code until SpringBoard reloads correctly.
  3. specialsyco

    specialsyco New Member

    Joined:
    Jan 20, 2008
    Messages:
    682
    Likes Received:
    0
    its behind the scenes it doesn't have an icon or anything it just make your ipod run smoother
  4. Aprosamurai

    Aprosamurai Active Member

    Joined:
    Jan 4, 2008
    Messages:
    1,606
    Likes Received:
    0
    Device:
    3G iPod touch
    It's like a failsafe for you win you get the swod it disables any activities until you respring or reboot

    Edit:Damn
  5. cacman93

    cacman93 Banned

    Joined:
    Jul 13, 2008
    Messages:
    1,062
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    SO if anyone of you know about hacking the psp ,it's like cxmb, but not for themes, for everything Cxmb, stood for Customize the xmb, cross media bar. Or theming the psp. So mobile substrate = cxmb, but not only theming for the iphone/touch, but for other things cool
  6. Jarlath

    Jarlath Retired Moderator

    Joined:
    Mar 21, 2008
    Messages:
    2,321
    Likes Received:
    0
    Actually, it's more a Safe Mode for the iPod Touch and iPhone than it is there to 'customize' the SpringBoard. Code that does customize the springboard uses it... but that's because it gives you a fallback position if something goes horribly wrong.
  7. yozzozo

    yozzozo New Member

    Joined:
    Mar 17, 2009
    Messages:
    2
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    I had to set this straight.

    MobileSubstrate is not just this "safe mode" that people are talking about.

    MobileSubstrate is a few system shared dynamic libraries (.dylib files, similar to Windows .DLLs) that allows developers to write programs that extend programs they didn't write.

    For example, SpringBoard, the iPhone/iPod Touch "shell" (basically the program that allows you to launch applications) has code in it to launch applications whenever you tap their icon. Using MobileSubstrate, you can write a program that will "inject" itself into this code, so that instead of running the ORIGINAL code that SpringBoard provides, YOUR code will be run.
    In the case of the SpringBoard app icon launch code, instead of launching the app, tapping the icon would do something completely different.
    In this way, you can modify the behavior of other people's applications (even Apple's built in apps), without having their source code.

    MobileSubstrate loads 3rd-party .dylib files ("MS extensions" or "MS libraries" or "MS plugins") and injects them into the programs that they target. Since developers make mistakes, it's entirely possible that injecting a faulty MS extension into SpringBoard will make SpringBoard crash (and then you would need to reboot your phone).
    Because this may happen, MobileSubstrate ALSO provides a "safe mode" for SpringBoard that will DISABLE ANY 3RD PARTY MS EXTENSIONS.
    This is similar to Windows' safe mode, where it disables all drivers upon system startup. MobileSubstrate AUTOMATICALLY activates its safe mode when it detects that SpringBoard has crashed (due to one of the installed MS extensions). When MS's safe mode is active, you can remove any bad extension that is crashing SpringBoard. After rebooting your phone, safe mode will not be active and all MS extensions will work normally.

    MobileSubstrate, written by Saurik, is a required component (aka Dependency) of many jailbroken programs, such as Winterboard, QuickGold, SBSettings, Five Icon Dock, Clippy, Backgrounder, etc.

    -yozzozo

    FYI: for those interested, it was possible to do the things you can do with MS before MS existed. Objective-C (the main programming language of iPhone OS) lets you hook (extend) programs. The main thing that MS provides is it makes it really EASY and STANDARDIZED to do so.
  8. Meikura

    Meikura Super Moderator Staff Member

    Joined:
    Jan 16, 2008
    Messages:
    6,134
    Likes Received:
    432
    Device:
    iPhone 4 (Black)
    While that's a very good write up, this thread is almost a year old. Please don't bump old threads.

    </thread>
Thread Status:
Not open for further replies.

Share This Page