阅读背景:

不理解为什么我要得到解析206错误(UserCannotBeAlteredWithoutSessionError)

来源:互联网 
PFCloud.callFunctionInBackground("updatePositions", withParameters: ["username" : username, "location" : locationTitle, "instructor" : instructorSwitch.on, "guard" : guardSwitch.on, "sup" : supSwitch.on]) {
    (positions: AnyObject!, error: NSError!) -> Void in
    if error == nil {

        self.currentUser.setValue(self.instructorSwitch.on, forKey: (self.shortTitle + "Instructor"))
        self.currentUser.setValue(self.guardSwitch.on, forKey: (self.shortTitle + "Guard"))
        self.currentUser.setValue(self.supSwitch.on, forKey: (self.shortTitle + "Sup"))

        self.currentUser.save(nil)

        self.navigationController?.popToRootViewControllerAnimated(true)
    }

    else {

        let errorAlert = UIAlertController (title: "Error", message: "There was an error while processing your request. This may be because the app could not connect to the internet. Please try again.", preferredStyle: UIAlertControllerStyle.Alert)

        let actionCancel = UIAlertAction (title: "Dismiss", style: .Cancel, handler: nil)

        errorAlert.addAction(actionCancel)

        self.presentViewController(errorAlert, animated: true, completion: nil)
    }
PFCloud.callFunctionInBackground("updatePositio



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: