How to run an executable in iOS App?

血红的双手。 提交于 2019-12-12 05:00:51

问题


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,

  1. How can i run an executable from my app ? OR How can i execute shell commands from my app ?
  2. How can i make use of NSTask in iOS ?
  3. Are there any other libraries like NSTask which i can make use of ?
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!