Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

raziiq

macrumors member
Original poster
Aug 26, 2008
82
0
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??
 
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?
 
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.
 
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.

thanks for the reply. Can you please guide me how can i do this? What approach should i take to do this job efficiently?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.