将接收推送通知限制到推送它的同一设备

时间:2015-03-31 07:10:20

标签: ios objective-c apple-push-notifications

我正在我的应用中注册iOS推送通知。推送通知正在发送到所有设备。

[application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeAlert) categories:nil]];

[application registerForRemoteNotifications];

我想限制从哪里发送接收推送通知。因为,如果我从我的A设备发送推送通知,并且进入主屏幕,则同一A设备也正在接收该推送通知。这不是我预期的行为。

如何限制接收推送通知到推送它的同一设备?

1 个答案:

答案 0 :(得分:0)

 Send the APNS Device Token of Device A to the API/Webservice sending Push Notifications.
 Ask Web service developer to restrict sending Push Notification to APNS Device Token of Device A and send to rest devices.
 And you are done.