Leap Motion App with Swift (Part 1)

Leap Motion App with Swift (Part 1)

I have recently started playing with SceneKit and working with one of our Unity developers on creating interactive demos using the Kinect. I feel like my mind has opened up to new ways to use this new virtual reality hardware to think of new ways of interacting with my apps (I know I am a little late to the game but whatever). Getting the leap motion SDK set up using swift was very straight forward. You can see my Github project here as I make progress: [LeapFace](https://github.com/cmavromoustakos/LeapFace) **Step one:** Copy the files from the leap SDK. You will need the following files. You can download them from the [Leap Motion Site](https://developer.leapmotion.com/v2) Leap.h LeapMath.h LeapObjectiveC.h LeapObjectiveC.mm libLeap.dylib **Step two:** Add a new "Copy Files Phase" under build phases to your project. Add the libLeap.dylib to the list of files in the newly created Copy Files phase and make sure you set the destination to "Executables" ![Build phases] (https://raw.githubusercontent.com/cmavromoustakos/LeapFace/master/LeapFace_xcodeproj.png) **Step three:** Create your bridging header (in the case of the example LeapFace-Bridging-Header.h) and add the following line: // // Use this file to import your target's public headers that you would like to expose to Swift. // #import "LeapObjectiveC.h" **Step four:** Initialize your leap controller to start capturing events from the device: Whichever controller you want to interact with the Leap motion device let leapController = LeapController()