Is it possible to make a system call, such as executing ls -la
, and use the result in your app?
相关问题
- How to get the return code of a shell script in lu
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 使用2台跳板机的情况下如何使用scp传文件
- 现在使用swift开发ios应用好还是swift?
- In IntelliJ IDEA, how can I create a key binding t
- shell中反引号 `` 赋值变量问题
- How get the time in milliseconds in FreeBSD?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
Usually when someone says system call they mean calling into the kernel through one of the defined entry points. While its technically possible on iPhone, you are always better of going through the libSystem shims because the call interface is probably not stable (it isn't on Mac OS X for instance). I doubt Apple would like it if you did that, but I suspect no one as really thought about it much and they are unlikely to notice.
I don't think that is what you mean though. I think you want to use ISO/IEC 9899:1990 (C90) C libraray function "system". The answer to that is no, you can't.
Sadly syscall.h under iOS is a private api. While you can use it in private applications Apple will not allow you to use the syscall() API for App Store submissions unfortunately.