问题
I want to run an executable file in my iOS app. (or execute some command line commands)
I think this can be done with the help of NSTask, but that doesn't seem to be available in iOS (its available for mac OS X only).
So,
- How can i run an executable from my app ? OR How can i execute shell commands from my app ?
- How can i make use of NSTask in iOS ?
- Are there any other libraries like NSTask which i can make use of ?
- If none of the above is possible, please let me know a way around.
I want my app to be uploaded on the app store, so please don't answer anything related to jailbreaking.
Also, Don't tell me apple would reject it, i want to take a chance.
回答1:
You can't run an executable from your app due to the sandboxing. From the list 1-4 are not possible.
NSTask
is not available because it would violate the sandboxing.
来源:https://stackoverflow.com/questions/24935939/how-to-run-an-executable-in-ios-app