Friday, 15 May 2015

objective c - Parse - getting the object id with a value -



objective c - Parse - getting the object id with a value -

i need object id of pfobject using column. example, have column name , want object id using name.

i have pfobject. has values like: name, photo objectid , more... have object using 1 of values , not object id

for example.. method gives me object using object id , want object using "name" example.

pfquery *query = [pfquery querywithclassname:@"gamescore"]; // retrieve object id [query getobjectinbackgroundwithid:@"xwmyz4yegz" block:^(pfobject *gamescore, nserror *error) { // code }];

thanks!

from parse docs. docs excellent.

pfquery *query = [pfquery querywithclassname:@"gamescore"]; [query wherekey:@"name" equalto:@"a name here"]; [query findobjectsinbackgroundwithblock:^(nsarray *objects, nserror *error) { // code here can extract id using objects[i].objectid }];

objective-c parse.com

No comments:

Post a Comment