Minimal set of changes to Lua so it can be called from within an iOS app within Apple API constraints:
- Xcode project to create dynamic libraries
- rename
main
tolua_main
andluac_main
- rename
system
toios_system
- erase all memory when leaving the program
- Run the shell script
get_lua_source.sh
withsh get_lua_source.sh
. It will download the source and patch a few files. - open
lua_ios.xcodeproj
- hit "Build" in Xcode.
- you're done. You now have a
lua.framework
that you can link with your projects. - if you plan to call system commands from lua (
ls
,rmdir
,curl
...) you will need to link with the ios_system framework. Same if you want to call lua commands usingsystem()
calls. - if you only need Lua without any calls to system functions, comment calls to
system()
and do not link withios_system
.