简体   繁体   中英

Can I tell if an iOS device receives a Push Notification?

I want to count the number of devices that receive a Push Notificaiton. I need to count the devices that receive the notification, not the number of devices that accept the notification and open the app, so didReceiveRemoteNotification and didFinishLaunchingWithOpetions won't work. I can't do this on the server end, I have to do it on the client.

Is it possible to tell, from the client end, if an iOS device has received a Push Notificaiton?

I don't think what you're asking is possible from the client side. The only time an app knows a notification has been delivered is when it is running in the foreground (in that case, didReceiveRemoteNotification gets called). If the app isn't running or is in the background, it has no way of knowing a notification has arrived.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM