Reputation: 402
I would like to edit a custom field in my parse app using parse iOS sdk, however, the suggested way does not seem to work.
var user = PFUser()
// other fields can be set just like with PFObject
user["phone"] = "415-392-0202" //ERROR: cannot assign a value of type string to a value of type any object?
The methods user.setValue and user.setObject does seem to update the value, but the change remains unseen in Parse.com web ui.
// facebookID is a string parse field
user?.setObject("OK!", forKey: "facebookID")
user?.setValue("OK!", forKey: "facebookID")
Is there any other way to edit custom fields on parse in swift?
Upvotes: 2
Views: 448
Reputation: 5248
Those do work, the reason you're not seeing the changes in the dashboad is because you're not saving the user after that.
user.setObject("OK!", forKey: "faceBookID")
user.saveInBackground()
Upvotes: 3