Reinstalled xcode, template code now working. wtf