When I use Parse 1.8.5 to upload data to Parse, this cloud code has compile error in "params" that I 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 that there are optional types in the values of params
.
Make sure that all values are unwrapped.