We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In below code, continue block is executing only for failure cases but not for success cases.
QMServicesManager().authService.signUpAndLogin(with: user).continue({ (users: BFTask!) -> Any? in if users.isFaulted || (users.error != nil) { let alert = UIAlertController(title: "Error!", message: "Some error occurred on server", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) self.present(alert, animated: true, completion: nil) } else if users.isCancelled { let alert = UIAlertController(title: "Error!", message: "User registration is not completed", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) self.present(alert, animated: true, completion: nil) } else if users.result != nil { let alert = UIAlertController(title: "Done!", message: "User (users.result!.fullName) registration is successful", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) self.present(alert, animated: true, completion: nil) } return nil })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In below code, continue block is executing only for failure cases but not for success cases.
QMServicesManager().authService.signUpAndLogin(with: user).continue({ (users: BFTask!) -> Any? in
if users.isFaulted || (users.error != nil) {
let alert = UIAlertController(title: "Error!", message: "Some error occurred on server", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
else if users.isCancelled {
let alert = UIAlertController(title: "Error!", message: "User registration is not completed", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
else if users.result != nil {
let alert = UIAlertController(title: "Done!", message: "User (users.result!.fullName) registration is successful", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
return nil
})
The text was updated successfully, but these errors were encountered: