Wax and XCode 4, any news?

156 views
Skip to first unread message

Federico Noferi

unread,
Feb 18, 2012, 6:13:32 PM2/18/12
to iPhone Wax
Hi,

any news on having a working project template for XCode 4?

Thanks,
Federico

Paul Harper

unread,
May 3, 2012, 2:44:42 AM5/3/12
to ipho...@googlegroups.com
If you download wax.framework from the github page, you can use it to get the template working somewhat. With a little hacking, it's quite good.
  1. Make a new Xcode project and drag the unzipped framework folder onto the Frameworks group in Xcode.
  2. Rename your main.m file to main.m-old or something (otherwise a new one won't be generated for you by the template).
  3. Right click your main project group and select "New File...". It should bring up a dialog asking you to choose a template for your new file, and oddly enough there is an entry for Wax iPhone App.
  4. Go through the steps to make that and place it in the same directory as all your other code. Now you have an almost-working project set up.
  5. Remove the line #import "wax_xml.h". It was causing problems for me. Also remember to remove the argument luaopen_wax_xml from the call to wax_start.
  6. In the newly generated main.m, change the #imports from #import "wax.h" to #import "wax/wax.h". Prefix each import with "wax/" in the same way.
  7. If you're using ARC, make sure you set an exception for this file so it doesn't use ARC. I tried taking out the code ARC wouldn't allow, but it gave me a bunch of error messages about memory leaks. Those went away when I left manually managed.
  8. You may also need to clone the github project and copy its contents into the wax folder that the template created. Until I did that, I couldn't get any of the rake tasks to work.
That's from memory (but I just got done doing it), so it should work, but you never know. At the end of the day, you can always try these instructions.
Reply all
Reply to author
Forward
0 new messages