我正在使用最新的Parse SDK并将数据发送到云数据 这是我目前的代码,但我不确定如何在成功时检索objectId:
PFObject *testObject = [PFObject objectWithClassName:@"CLASS_NAME"];
testObject[@"Name"] = firstName;
testObject[@"LastName"] = lastName;
[testObject saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error)
{
if (succeeded)
{
//success trigger
}
}];
答案 0 :(得分:5)
其内部:
PFObject *testObject
使用
访问它NSLog(@"objectID: %@", testObject.objectId);
请参阅:https://parse.com/docs/ios/api/Classes/PFObject.html#//api/name/objectId