LuaViewSDK icon indicating copy to clipboard operation
LuaViewSDK copied to clipboard

'system' is unavailable: not available on iOS

Open daasan123 opened this issue 7 years ago • 4 comments

Demo 运行出错:'system' is unavailable: not available on iOS

daasan123 avatar Mar 03 '18 14:03 daasan123

怎么官网没有反馈啊

xiaoliuTX avatar Apr 17 '18 14:04 xiaoliuTX

system方法在ios11被废弃了,看这里https://blog.csdn.net/wangwenfei1990/article/details/78122134

keirlee avatar Apr 25 '18 09:04 keirlee

Apple已经废弃这个API了,可以使用其他API代替,或是直接禁用 os.execute 的实现吧 。 看楼上的解决方案是用 nftw() 了, 这有点不对头吧,因为是 os.execute 内部调用了 system() API.

nftw() 和 system() 不是一个功能吧,这还不如用 popen() 正确点。

shengdoushi avatar Jul 17 '18 03:07 shengdoushi

"Use posix_spawn APIs or NSTask instead." 苹果的推荐替代方案是 posix_spawn, 也可以试试这个

shengdoushi avatar Jul 19 '18 08:07 shengdoushi