我尝试向用户发送通知。 继承我的代码
PFQuery *qry = [PFUser query];
[qry getObjectWithId:user.objectId];
PFQuery *pushQuery = [PFInstallation query];
[pushQuery whereKey:@"user" matchesQuery:qry];
// Send push notification to query
PFPush *push = [[PFPush alloc] init];
[push setQuery:pushQuery]; // Set our Installation query
NSDictionary *data = [NSDictionary dictionaryWithObjectsAndKeys:
@"A New Push Message was Put HERE!", @"alert",
@"ursound.caf", @"sound",
@"Increment", @"badge",
@"Optionally a type was set", @"type",
nil];
[push setData:data];
[push sendPushInBackground];
但是,当我发送它时,没有任何效果。在Parse推送通知面板上显示
按下已发送0
当我通过&#34发送(作为测试)时,发送推送"按钮,没关系。
任何帮助?