加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

swift – 不能将类型'[String:String?]’的值转换为预期的

发布时间:2020-12-14 05:19:34 所属栏目:百科 来源:网络整理
导读:当我使用Parse 1.8.5将数据上传到Parse时,这个云代码在“params”中有编译错误,我无法调试它. let params = ["phoneNumber" : userPhoneNumber,"username": username,"password": userPassword,"Email": userEmail ] PFCloud.callFunctionInBackground("send
当我使用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()
            }
        })
错误消息说,params的值中有可选的类型. 确保所有值都被打开.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读