Is it possible to execute a bash command within an iOS app? For example, I want to execute the “ping” command in my app, and I need to get the command’s output as well. Hope I described my question correctly, thank you!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can but it is extremely limited, and ping will probably not work… Regardless use the system() and check gdb.
Running BASH script from iPhone app?
But Quentin is right about using PING.
NOTE: This is only useful for debugging and shouldn’t be used for actual apps.
This screenshot shows ls being run in the ios simulator through the C function system().
