1
我使用Parse SDK创建并发送推送通知,但是我发现我的通知都没有到达。难道我做错了什么?我已经设置了应用程序ID和供应配置文件正确,因为我可以从设备发送推送通知后,从仪表板Parse.com发送测试通知推送通知未发送 - 解析SDK
// Create new Push Notifications
PFQuery *pushQuery = [PFInstallation query];
[pushQuery whereKey:@"user" equalTo:otherUser];
NSString *pushNotificationMessage = [NSString stringWithFormat:@"%@ added you",[[PFUser currentUser] username]];
// Send push notification to query
PFPush *push = [[PFPush alloc] init];
[push setMessage:pushNotificationMessage];
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"added you",@"Alert", nil];
[push setData:dict];
[push setQuery:pushQuery];
[push sendPushInBackground];
您是否检查过查询以确保它肯定返回结果?如果是的话,Parse的服务器上会显示哪些内容? – Logan
嗨... Plz你能说出这条线上的用户是什么... [pushQuery whereKey:@“user”equalTo:otherUser]; –