Sending push notification to all clients?
i configured my app push notification enabled.
should u collect the devicetoken id to my database? i dont send any particular message to some clients. i will开发者_JS百科 inform all clients (push notification is accepted on device).
should i save the devietokenid in didRegisterForRemoteNotificationsWithDeviceToken event?
is it possible to send push notif. to all clients (not collecting devicetokenid)?
Yes, in didRegisterForRemoteNotificationsWithDeviceToken, you are supposed to send the deviceToken to your server and store it there in some way. You can later use this deviceToken at any time to send a push notification to the device.
No, as far as I know, you always need to specify a device token to the APN server when sending a push message. There's no way to broadcast to all registered devices; you need to send multiple messages yourself to broadcast.
精彩评论