Fix #744. Adds Lua and general fixes to the XCode template.