无法将'[String:String?]'类型的值转换为预期的参数类型'[NSObject:AnyObject]?'

ios*_*ers 10 nsobject parse-platform swift ios9

当我使用Parse 1.8.5将数据上传到Parse时,这个云代码在"params"中有编译错误,我无法调试它.

       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()
            }
        })
Run Code Online (Sandbox Code Playgroud)

vad*_*ian 16

错误消息表明值中有可选类型params.
确保所有值都已解包.