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.

Answers


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.


Need Your Help

What sorting algorithm is this?

c++ c sorting

Update: OK I see it's a bubble sort, but is it less efficient because it doesn't stop when there's no swap on a particular run? It runs until first is null.

Jersey v1 Spring Boot change jersey root Path to expose actuator endpoints

java spring-boot jersey-1.0 spring-boot-actuator

starting from dsyer's example: https://github.com/dsyer/spring-boot-jersey/tree/master/spring-boot-sample-jersey1