forked from probablycorey/wax
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation framework
probablycorey edited this page Aug 31, 2011
·
5 revisions
-
Open your project in Xcode and drag wax.framework into the frameworks folder. Make sure you click the "Copy items into destination group's folder" box.
-
Create a file called init.lua via Xcode (make sure it is added to the app's bundle!) Add a code like this
puts("ZOMG, LUA IS RUNNING")
puts("Here is Lua talking to ObjC %s", tostring(UIApplication:sharedApplication()))
- Open up your AppDelegate file and import the wax header file by adding this line...
#import "wax/wax.h"
- In your AppDelegate's application:didFinishLaunchingWithOptions: method, add this line.
wax_start("init.lua", nil);
// To add wax with extensions, use this line instead
// #import "wax/wax_http.h"
// #import "wax/wax_json.h"
// #import "wax/wax_filesystem.h"
// wax_start("init.lua", luaopen_wax_http, luaopen_wax_json, luaopen_wax_filesystem, nil);
All done, build your app and you will see Lua printed out some code to the Xcode console.