我正在尝试向特定的PFUser发送推送。对于每个PFInstallation,我有一个指向Parse内部User类的指针。我以前做过这个,但由于某种原因它失败了。
PFUser *gameOwner = [gameObject objectForKey:@"Defender"];
PFQuery *pushQuery = [PFInstallation query];
[pushQuery whereKey:@"user" equalTo:gameOwner];
PFPush *push = [[PFPush alloc] init];
NSDictionary *data = [NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat:@"New Game Started From %@!", [PFUser currentUser][@"Name"]], @"alert",
@"Increment", @"badge",
@"default", @"sound",
nil];
[push setQuery:pushQuery];
[push setData:data];
[push sendPushInBackground];
任何线索有什么问题?