Cant Call a function in Xcode using Swift 3

So here is the setup of my function within my swift code. I am logged in and using my access token.

 var myPhoton: SparkDevice?
@IBAction func shadesOn(_ sender: Any) {
    let funcArgs = ["open"]
    myPhoton?.callFunction("open", withArguments: funcArgs)
    print("light is on")
}

The function on the photon side works, I can call it using the particle iPhone app.

Is myPhoton nil (have you instantiated it)?

I thought I was with " var myPhoton: SparkDevice?" sparkDevice is a class.

No, that line just declares myPhoton to be a variable of type SparkDevice, you still need to create an instance. Look at the GET AN INSTANCE OF A DEVICE section of the iOS SDK in the docs here.