swift - Cannot convert value of type '[String : String?]' to expected argument type '[NSObject : AnyObject]?' -


when use parse 1.8.5 upload data parse, cloud code has compile error in "params" cannot debug it.

       let params = ["phonenumber" : userphonenumber,                      "username": username,                     "password": userpassword,                     "email": useremail                      ]            pfcloud.callfunctioninbackground("sendcode", withparameters: params, block:                { (response: anyobject?, error: nserror?) -> void in             if response?.localizeddescription != nil {                 print(error)                 var alert = uialertview(title: "failure", message: "signup error", delegate: self, cancelbuttontitle: "ok")                 alert.show()             } else {                 self.activityindicator.stopanimating()             }         }) 

the error message says there optional types in values of params.
make sure values unwrapped.


Comments