未创建解析iOS signUpInBackgroundWithBlock会话
想知道是否有人知道为什么不能在使用SignupInBackgroundithBlock()注册时设置会话的可能原因?创建用户时没有问题,但从未设置会话(并且不会在数据浏览器中创建) 我在应用程序委托中启用了EnableRevecableSessionInBackground(),这不是迁移。测试重置模拟器,仍然没有运气。登录会按预期设置会话 有什么想法吗未创建解析iOS signUpInBackgroundWithBlock会话,ios,swift,session,parse-platform,Ios,Swift,Session,Parse Platform,想知道是否有人知道为什么不能在使用SignupInBackgroundithBlock()注册时设置会话的可能原因?创建用户时没有问题,但从未设置会话(并且不会在数据浏览器中创建) 我在应用程序委托中启用了EnableRevecableSessionInBackground(),这不是迁移。测试重置模拟器,仍然没有运气。登录会按预期设置会话 有什么想法吗 func processSignUp() { var userUsername = self.usernameField.text
func processSignUp() {
var userUsername = self.usernameField.text
var userEmail = self.emailField.text.lowercaseString
var userPassword = self.passwordField.text
// Start activity indicator
HUDController.sharedController.contentView = HUDContentView.ProgressView()
HUDController.sharedController.show()
// Create the user
var user = PFUser()
user.username = userUsername
user.password = userPassword
user.email = userEmail
// Sign up in background
user.signUpInBackgroundWithBlock {
(succeeded, error) -> Void in
if error == nil {
HUDController.sharedController.hide()
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let tourViewController : TourViewController = storyboard.instantiateViewControllerWithIdentifier("Tour") as! TourViewController
self.navigationController?.pushViewController(tourViewController, animated: false)
} else {
HUDController.sharedController.hide()
ErrorHandlingController.handleParseError(error!, viewController: self)
}
}
}
你能添加一些代码吗?这里是注册时函数的一些精简代码-所以问题是,在你这样注册后,解析数据库中没有记录?这是一个遗留应用程序吗?请提供证据证明“课程从未设置”。嗨,伙计们,谢谢你们的跟进。完成了一些进一步的测试,会话在注册时设置,但在我对当前用户调用“saveInBackgroundWithBlock”时,会话就被删除了。看起来像是一个非常类似的问题,因为这里-不是一个遗留的应用程序。