1. NetMage's Avatar
    Does anyone have a sample of a non-GUI SpringBoard application?

    Launching a program without a UIApplication class that has a Default.png causes SpringBoard to never return (had to manually kill it).

    Calling [self terminateWithSuccess] in applicationDidFinishLaunching: doesn't seem to work too well.

    Not having a UIWindow for the application also seems problematic.

    So far I am creating an empty UIWindow/UIView (well, black) then setting up an NSTimer to call terminateWithSuccess after 0.01 seconds.

    Seems like it should be easier.
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage
    2008-01-22 09:17 AM
  2. jakecigar's Avatar
    I've written several non-gui apps for my iPhone.

    they move files around then restart the springboard when they leave.

    launchctl stop com.apple.SpringBoard

    All the code was in shell scripts wrapped in apps or jiggy apps. no C code


    Hope it helps!
    http://jpassoc.com/x -- with free itunes under the puppy!
    If I help you out, please press THANKS!

    3g QuickPWN'ed with 2.1
    2008-01-22 09:52 AM
  3. NetMage's Avatar
    Thanks, but I think that's too heavy handed for an app that doesn't need a respring.
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage
    2008-01-22 03:43 PM
  4. jakecigar's Avatar
    for lightweight just run springboard
    exec /System/Library/CoreServices/SpringBoard.app/SpringBoard
    http://jpassoc.com/x -- with free itunes under the puppy!
    If I help you out, please press THANKS!

    3g QuickPWN'ed with 2.1
    2008-01-22 07:05 PM
  5. guided's Avatar
    NetMage - any reason why you'd like to do this (i.e. a non-Gui app)? You can still get away with a non-gui app that uses UIApplication/UIWindow by writing a daemon and then setting the visibility for the UIWindow to false. I've in fact managed to do this a number of times. For example, you may want a stylish UIAlertSheet to display from below the springboard periodically which I wasn't able to display without having to write a daemon that uses a UIApplication/UIWindow but with the visibily set to NO.

    In fact, I think this is how ScreenShot.app works - it's a non-gui-ish app with two floating buttons only but the parent UIView visibility set to false and thus the Default.png won't be required (also because it'll be running as a daemon).
    2008-01-24 12:44 PM
  6. NetMage's Avatar
    In my case (Laps2Note), by program is launched from SpringBoard but doesn't need user input - it just executes and closes.

    Setting it up without a UIApplication caused SpringBoard to never display the icons again, or never replace the Default.png - I'll need to test what happens if there is no Default.png but I am not optimistic.
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage
    2008-01-24 04:21 PM
  7. guided's Avatar
    hmm.. so you still want it to have an icon but not show anything. Perhaps you could get away with a UIApplication, keep the UIView empty/invisible and create an empty Default.png via 'touch Default.png' - this should then not show anything but work (in theory).
    2008-01-24 07:15 PM
  8. chrism238's Avatar
    Have a quick look at my WifiToggle application; it may be enough for your needs.
    2008-01-24 09:16 PM
  9. NetMage's Avatar
    Have a quick look at my WifiToggle application; it may be enough for your needs.
    Your source link appears to be broken?

    hmm.. so you still want it to have an icon but not show anything. Perhaps you could get away with a UIApplication, keep the UIView empty/invisible and create an empty Default.png via 'touch Default.png' - this should then not show anything but work (in theory).
    I did something similar when testing before I added the Timer to execute terminateWithSuccess after applicationDidFinishLaunching.

    I did have a non-empty Default.png and the result was my Default.png showed, and SpringBoard/SummerBoard never redrew the screen when my app terminated - falling off the end of applicationDidFinishLaunching and never calling terminate apparently doesn't inform SpringBoard to take over the screen. OTOH, calling terminate from inside applicationDidFinishLaunching doesn't work either.

    Really, I was hoping there is a way to just have main() just execute some code and return and SpringBoard resume control, but apparently SpringBoard expects some specific messages back to know when the program has closed.
    Last edited by NetMage; 2008-01-25 at 02:41 AM. Reason: Automerged Doublepost
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage
    2008-01-25 02:41 AM
  10. chrism238's Avatar
    Your source link appears to be broken?
    Doh! Sorry, should be fixed now
    2008-01-25 04:34 AM
  11. NetMage's Avatar
    Looking at your code, your essentially doing what I am doing (plus the alert) which is what I am trying to avoid.

    Thanks!
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage
    2008-01-25 07:19 AM
LINK TO POST COPIED TO CLIPBOARD