Skip to content

Installation framework

probablycorey edited this page Aug 31, 2011 · 5 revisions

Where to get the framework

Add the wax.framework to an existing project

  1. 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.

  2. 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()))
  1. Open up your AppDelegate file and import the wax header file by adding this line...
    #import "wax/wax.h"
  1. 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.

Clone this wiki locally