我现在更好地理解它了,感谢@dbarthelemy。但是,现在这是我的代码,我收到错误/终止没有“结果与查询匹配”:
- (IBAction)createGroup:(id)sender {
PFObject *message = [PFObject objectWithClassName:@"Messages"];
[message setObject:self.recipients forKey:@"recipientIds"];
[message saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (error) {
NSLog(@"Error %@ %@", error, [error userInfo]);
}
else [self performSegueWithIdentifier:@"showDate" sender:self];
}];
}
然后在第二个控制器上:
PFQuery *message = [PFQuery queryWithClassName:@"Message"];
[message getObjectInBackgroundWithId:@"recipientIds" block:^(PFObject *message, NSError *error) {
[message setObject:file forKey:@"file"];
[message setObject:fileType forKey:@"fileType"];
[message setObject:[[PFUser currentUser] objectId] forKey:@"senderId"];
[message setObject:[[PFUser currentUser] username] forKey:@"senderName"];
[message saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {