+ Reply
Results 1 to 9 of 9

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


Thread: Launch App from Command Line?

is a discussion within the

OS Apps and Development

forums, a part of the

Computer Modding Software

section;
Is it possible to launch an application from command line, using a shall script or other binary? Thanks in advance, Eric
...
  1. #1
    Green Apple boomersmech's Avatar
    Join Date
    Oct 2007
    Location
    San Diego
    Posts
    35
    Thanks
    1
    Thanked 7 Times in 3 Posts

    Default Launch App from Command Line?
    Is it possible to launch an application from command line, using a shall script or other binary?

    Thanks in advance,
    Eric

  2. #2
    My iPhone is a Part of Me iBlade's Avatar
    Join Date
    Oct 2007
    Posts
    815
    Thanks
    43
    Thanked 367 Times in 217 Posts

    I know you can launch an app from terminal by typing /var/Applications/Name.app/Name where Name gets replaced by the app name you want to start. This works from winscp for example or the phone itself using Term-vt100. Make sure you write the name correctly and it is case sensitiv.
    Don't be shy if I helped you use the Thanks button, I do it.

  3. #3
    Developer NetMage's Avatar
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    1,296
    Thanks
    72
    Thanked 210 Times in 168 Posts

    Applications launched as separate processes don't respond to the home button and don't receive the rotate notifications (or some others) that SpringBoard provides.
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage

  4. #4
    iPhone? More like MyPhone GenghisPhlip's Avatar
    Join Date
    Jan 2008
    Location
    Texas
    Posts
    179
    Thanks
    10
    Thanked 7 Times in 6 Posts

    I never got them to work right from the command line. I gave up.

  5. #5
    My iPhone is a Part of Me iBlade's Avatar
    Join Date
    Oct 2007
    Posts
    815
    Thanks
    43
    Thanked 367 Times in 217 Posts

    It does come in handy sometimes, just last night after trying something I could not access installer and could not respring due to the icon's not showing and did not want to risk to reboot, I launched from terminal and could fix everything with no risk.
    Don't be shy if I helped you use the Thanks button, I do it.

  6. #6
    What's Jailbreak?
    Join Date
    Apr 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    This is late to respond the the question, but......

    Erica Utilities (from Cydia) has several command line utilities, one of them is to launch a regular Application, and I believe this way it would "behave normally". On Cydia use Search and it should be in the list there, and command is "launch" = "Run an application from the command line as if it had been launched in Springboard. You must submit the application id, eg. launch com.apple.Calculator

    -- go to Cydia right from your iPhone...

  7. #7
    What's Jailbreak?
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Launch Application from treminal doesn't work for me on 3GS iOS 4.0....
    i've tried to launch Youtube app ... by the following:

    myIphone-:/Applications root# launch = "gsc.youtube"
    2010-08-04 16:45:39.467 launch[494:107] *** Assertion failure in -[UIApplication init], /SourceCache/UIKit/UIKit-1261.5/UIApplication.m:509
    2010-08-04 16:45:39.480 launch[494:107] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'There can only be one UIApplication instance.'
    *** Call stack at first throw:
    (
    0 CoreFoundation 0x31785fd3 __exceptionPreprocess + 114
    1 libobjc.A.dylib 0x320118a5 objc_exception_throw + 24
    2 CoreFoundation 0x31785e91 +[NSException raise:format:arguments:] + 68
    3 Foundation 0x3299e5bb -[NSAssertionHandler handleFailureInMethodbject:file:lineNumber:description:] + 62
    4 UIKit 0x3011d4b9 -[UIApplication init] + 128
    5 launch 0x00001d90 main + 252
    6 launch 0x00001bec _start + 312
    7 launch 0x00001a88 start + 24
    )
    terminate called after throwing an instance of 'NSException'
    Abort trap


    i also tried to run it "as is"
    ......-:/Applications root# ./YouTube.app/YouTube

    but still no luck...

    can you please advise what am i missing here ?

  8. #8
    What's Jailbreak?
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I know it's been a couple of years since that post, and sorry for bumping, but I have the same problem. Did anyone manage to get launch working?

  9. #9
    What's Jailbreak?
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Run App from Command Line
    Quote Originally Posted by rausted View Post
    I know it's been a couple of years since that post, and sorry for bumping, but I have the same problem. Did anyone manage to get launch working?


    Hi i am a developer and working on it
    You have to do 2 things

    if app name is TestApp

    cd /
    cd Applications
    cd TestApp.app

    1. chmod 777 TestApp
    2. ./TestApp


    mine is working and inshaallah will your also

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