I'm trying to pass some parameters to my Parse Cloud Code function, and receive the following error message in Xcode. cannot convert value of type '[String : String?]' to type '[NSObject : AnyObject]' in coercion
. It works fine until I reference the incomingUser.objectId
. Here's the code I'm passing:
let params = ["userType" : userType, "recipient" : self.incomingUser.objectId]
PFCloud.callFunctionInBackground("pushNotification", withParameters: params as [NSObject : AnyObject]) {
(res: AnyObject?, error: NSError?) -> Void in
print(res)
print(error)
}
Thanks for any help you can provide.