Reputation: 400
I am using latest Parse SDK and am sending data to the Cloud Data.
This is my code at the moment but am unsure how to retrieve the objectId upon success:
PFObject *testObject = [PFObject objectWithClassName:@"CLASS_NAME"];
testObject[@"Name"] = firstName;
testObject[@"LastName"] = lastName;
[testObject saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error)
{
if (succeeded)
{
//success trigger
}
}];
Upvotes: 2
Views: 341
Reputation: 8465
its inside:
PFObject *testObject
access it with
NSLog(@"objectID: %@", testObject.objectId);
see: https://parse.com/docs/ios/api/Classes/PFObject.html#//api/name/objectId
Upvotes: 5