在Parse iOS中更新保存的数据 [英] Updating Saved Data in Parse iOS
本文介绍了在Parse iOS中更新保存的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用此代码在解析时更新数据浏览器上的数据.
I use this code to update my data on data browser on parse.
PFQuery *query = [PFQuery queryWithClassName:@"UserInformation"];
[query getObjectInBackgroundWithId:@"dIwnk9tbr0" block:^(PFObject *gameScore, NSError *error)
{
gameScore[@"email_address"] = @"testkolang@y.com";
[gameScore saveInBackground];
}];
但是我有这种错误.并且解析的数据不会更改.
But I have this kind of error. And the data on parse is not changed.
2014-03-12 18:08:06.036 AndroidiOsPushTest[3725:1803] Error: object not found for update (Code: 101, Version: 1.2.18)
推荐答案
PFQuery *query = [PFUser query];
[query getObjectInBackgroundWithId:objectID block:^(PFObject *UserInfo, NSError *error) {
if (!error) {
[UserInfo setObject:self.userName.text forKey:@"username"];
[UserInfo setObject:@"US" forKey:@"country"];
[UserInfo saveInBackground];
}
else {
// Did not find any UserStats for the current user
NSLog(@"Error: %@", error);
}
}];
这篇关于在Parse iOS中更新保存的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文