问题
I have saved user pointer in instalation class. Web backend shows 0 subscribers

I am sending notification using below code
PFQuery *qry = [PFUser query];
[qry getObjectWithId:friendObject.objectId]; //friend object is ok like @"Fefl5x7nhl"
PFQuery *pushQuery = [PFInstallation query];
[pushQuery whereKey:@"user" matchesQuery:qry];
// Send push notification to query
PFPush *push = [[PFPush alloc] init];
NSString *msgString=[NSString stringWithFormat:@"%@ :%@",
[newMessage objectForKey:@"userName"],
tfEntry.text];
[push setQuery:pushQuery]; // Set our Installation query
NSDictionary *data = [NSDictionary dictionaryWithObjectsAndKeys:
msgString, @"alert",
@"ursound.caf", @"sound",
@"Increment", @"badge",
// @"Optionally a type was set", @"type",
nil];
[push setData:data];
[push sendPushInBackground];

AM i missing something? any suggestion would be great . Thanks for your valuable time
回答1:
As long as you have a column on the Installation
class called user
that is of type Pointer<My_User>
and you've actually populated it, your code should work.
There's a section in the Push Notification documentation that talks about adding data to the Installation
class:
https://parse.com/docs/push_guide#sending-queries/iOS
来源:https://stackoverflow.com/questions/25160595/sending-push-notification-from-mobile-to-particular-user-using-parse-parse-ios