我正在运行Parse Server
,Heroku
一切都运行良好,直到我运行我的应用程序并收到错误:Failed to run command eventually with error: Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set."
我没有丝毫线索是什么导致了这种情况,当应用程序运行时错误立即出现。我将我的iOS
应用程序连接到 Parse 服务器并正在写入Swift
.
启动应用程序时运行的唯一代码检查是否有用户以及他们是否验证了他们的帐户:
override func viewDidAppear(animated: Bool) {
var currentUser = PFUser.currentUser()
if currentUser == nil || currentUser!["phoneNumberVerified"] == nil {
performSegueWithIdentifier("showLogInSignUpView", sender: self)
} else {
if let numberIsVerified = currentUser!["phoneNumberVerified"] as? Bool {
if currentUser != nil && numberIsVerified == false {
performSegueWithIdentifier("showVerifyUserView", sender: self)
} else if currentUser != nil && numberIsVerified == true {
performSegueWithIdentifier("showDiscoverView", sender: self)
} else {
performSegueWithIdentifier("showLogInSignUpView", sender: self)
}
}
}
}