passing bash commands in xcode?

Discussion in 'iOS Programming' started by raziiq, Jul 23, 2009.

  1. raziiq macrumors member

    Joined:
    Aug 26, 2008
    #1
    Is there any way of passing bash script commands using xCode.

    For example lets say i have a UIButton and when i tap that button, a bash shell Script runs.

    Is it possible??
     
  2. raziiq thread starter macrumors member

    Joined:
    Aug 26, 2008
    #2
    i heard there is a command like

    Code:
    system("SSH command")
    this is working fine in simulator but not working for me in the real iPhone.

    Any suggestions?
     
  3. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #3
    It's possible.

    But you would have to compile the entire bash shell into your app, as the iPhone OS doesn't allow any new processes to be launched or run. So bash would have to be part of your app (as would any other utilities you would want to run. If you wanted ssh, you would have to compile all of it as a subroutine in your app's process space).

    The Simulator is inaccurate in that it doesn't enforce the security on an app's sandbox.
     
  4. raziiq thread starter macrumors member

    Joined:
    Aug 26, 2008
    #4
    thanks for the reply. Can you please guide me how can i do this? What approach should i take to do this job efficiently?
     

Share This Page