Hi, I try to use the following code to update user, but I got error: FAULT = ‘3027’ [Unknown error: null] <Unknown error: null>
let currentUser = Backendless.sharedInstance().userService.currentUser;
currentUser.setProperty(“name”, object: “Five888”)
let dataStore = Backendless.sharedInstance().data.of(BackendlessUser.ofClass())
// update object asynchronously
dataStore.save(
currentUser,
response: { (result: AnyObject!) -> Void in
let updatedUser = result as! BackendlessUser
print(“User has been updated: (updatedUser.objectId)”)
},
error: { (fault: Fault!) -> Void in
print(“Server reported an error (2): (fault)”)
})
the output is:
Server reported an error : FAULT = ‘3027’ [Unknown error: null] <Unknown error: null>
name property is NOT Identity.
If you take a look in Backendless Console at the Users > User Properties screen, one of the properties will have the “identity” radio button selected. What is the name of that property?
response: { ( user : BackendlessUser!) -> () in
print("User has been updated")
},
error: { ( fault : Fault!) -> () in
print("Server reported an error: \(fault)")
}
)
BTW,the SDK is downloaded from your official github url three days ago.
Could you please “print description of…” the currentUser variable before you call the “update” method? (this is the same as the “po” command in the debugger) and post it here?