A sequence of clear commits showing how to add Lua to an empty iOS app.
Written in early 2013 (Lua 5.2, Xcode 4.6, iOS 6.1). Based on parts two and three of James Norton's "Scripting iOS Games With Lua". Released into the public domain.
Each step is covered in a separate commit.
- Run Lua code from a string.
- Maintain interpreter's state between calls.
- Run Lua code from a file.
- Call an Objective-C function from Lua.
- Pass to Lua a pointer to an Objective-C object.
- Install CocoaPods.
git clone https://github.com/narfdotpl/lua-on-ios.git
cd lua-on-ios
pod install
open *.xcworkspace
- Build and run.