将推送通知限制在推送通知的同一设备上

Restrict receiving push notification to the same device where it has been pushed from

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

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

[application registerForRemoteNotifications];

我想限制接收推送通知的来源。因为,如果我从我的 A 设备发送推送通知,然后进入主屏幕,同一个 A 设备也会收到该推送通知。这不是我预期的行为。

如何将推送通知限制在推送通知的同一设备上?

 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.