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.