Results 1 to 6 of 6

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.

Thread: [2.0] Launching background processes

  1. #1
    Default [2.0] Launching background processes
    I can't see anyone else discussing this, but I am porting an application to 2.0 which should launch another application in the background, similar to the "Ants" application, but it seems launchctl will not work; Is there any way to get this functionality?

  2. #2
    Assuming jailbreak, can you not use the classic Unix fork/exec?

    Or are LaunchServices available? (Looking around, I don't see LaunchServices.framework on the phone...)
    Last edited by NetMage; 2008-08-29 at 07:19 AM.
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage

  3. #3
    I did notice that Cydia has a launchctl'ed code file! com.saurik.Cydia.Startup


    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
    <plist version="1.0">
    </plist> -- with free itunes under the puppy!
    If I help you out, please press THANKS!

    3g QuickPWN'ed with 2.1

  4. #4
    It definitely seems like system, fork and exec can be used to launch the executable, but can't use UIKit, or other ways to display graphics, similarly with launchctl -- in both approaches, `ps -A` shows that the process is running, but nothing is made visible.

    The nearest thing I've managed to do is copy the binary to a new /Applications/ directory with its own icon and Info.plist with a new CFBundleIdentifier, and use UIApplication launchApplicationWithIdentifier:suspended: -- this allows the application to start and display things, but it uses the whole screen, though my UIWindow is much smaller, and you cannot interact with anything 'behind' the application.

    So, it's close, but not quite there yet; Does anyone know any apps on 2.0 which can do this? Looking for something similar to Ants, or the screenshot applications.
    Last edited by iguessitisok; 2008-08-31 at 01:13 PM.

  5. #5
    I'm trying to figure out the same thing. The information I've found so far is that you can setup something though launchctl only during the install of your application since that's done as root. After that you can't access launchctl. I've played around with exec and that seems to work, but it was only a very basic app. I'll let you know what else I find out. Keep us posted if you find out more.

  6. #6
    Something that could help if you are looking at how Ants was done is to look at the source for Dock: - Creation: Dock 3.0: Quick app switching for jailbroken iPhone 2.0 phones

    It runs in the background and displays over other programs - there was a special mode required for this to work, and the limitation used to be there can be only one program of this type.

    Now he is using the WinterBoard module that allows injecting code into SpringBoard.
    Last edited by NetMage; 2008-09-11 at 05:49 AM. Reason: fix accidental doublepost
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts