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]; –