Send Universal Push Notifications - Xcode
I have finished this tutorial here http://mobiforge.com/developing/story/programming-apple-push-notification-services and now i can send a push notification to my device using my application. However i cannot figure out how to send push notifications not just to my specific device token but to all devices with my application.
You have to send the message to each device individually, i.e.: in a loop
Apples Push Notification servers only know to direct messages to specific devices. It is the developer's responsibility to pass the tokens you receive from the
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
method to your server ( through an HTTP post for instance ) and keep track of all the existing tokens.
If/when you want to send a message to all the devices - you simply need to iterate all the existing device tokens.