Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lua - 'system' is unavailable: not available in iOS

Tags:

xcode

ios

lua

I have opened an IOS Objetive C project that uses Lua in xCode 9 (which was working in xCode 8) and I get the following error:

'system' is unavailable: not available in iOS

ioslib.c enter image description here

I know that 'system' is unavailable in iOS11 but how can I fix this issue with Lua? This is a library that I have included and did not write myself.

like image 322
Harry Boy Avatar asked Jan 10 '18 12:01

Harry Boy


1 Answers

http://lua-users.org/lists/lua-l/2017-09/msg00242.html

disabled in luaconf.h by default:

#if defined(__APPLE__)
     #include "TargetConditionals.h"
     #if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
         #define system(s) ((s)==NULL ? 0 : -1)
     #endif // end iOS
#elif defined(__ANDROID__)
     #define system(s) ((s)==NULL ? 0 : -1)
#endif
like image 118
lbsweek Avatar answered Oct 24 '22 15:10

lbsweek