Sunday, September 29, 2013

For message push device token problems

Push on the news, have been puzzled. Server how to get all of the client device token.


1. Each client can send APNS device token server.
2. Local APNS message server to send information to the server, must have device token.


Where this device token obtained? Debug is able to understand, we can read their own itouch / ipad / iphone on. But on-line APP, device token should take the initiative to push all users to APNS. How we get from the server to the APNS device token it? Does each message can only be sent to a device token?
Reply:
Generally like this: device token is sent by the client to get your own server. When you need to push message, your server sends a push message with a device token to Apple's servers, Apple servers pushed under the device token to the corresponding client
Reply:
quote 1 floor reply:
generally like this: device token is sent by the client to get your own server. When you need to push message, your server sends a push message with a device token to Apple's servers, Apple servers pushed under the device token to the corresponding client

Positive solution.
Apple will need to get yourself a token, given their own servers.
Reply:
quote 1 floor reply:
generally like this: device token is sent by the client to get your own server. When you need to push message, your server sends a push message with a device token to Apple's servers, Apple servers pushed under the device token to the corresponding client

That server-side access to the client device is immediacy or client will be sent to a local storage device up?
Reply:
Need to save up.
Reply:
4th Floor reply quote:
need to save up.
save it, then it is saved to the local database? If so, delete the user how to push the client when the server-side synchronization delete database records.

Also, I downloaded the ios server side there is a feedback device functionality, looks to get the user's device registration, but always get the data.
 / ** 
* Retrieves a list of inactive devices from the Feedback service.
* @ Param args
* /
private static void feedbackTest (String [] args) {
String keystore = args [0];
String password = args [1];
boolean production = args.length> = 3? args [2]. equalsIgnoreCase ("production"): false;
try {
List devices = Push.feedback (keystore, password, production);

for (Device device: devices) {
System.out.println ("Inactive device:" + device.getToken ());
}
} Catch (CommunicationException e) {
e.printStackTrace ();
} Catch (KeystoreException e) {
e.printStackTrace ();
}
}

Reply:
Need to save to the server.
Reply:
You say the problem is that the official figure given in Step 3, this absolutely must own server to each DeviceToken keep up with FeedBack reception, ps:

Reply:
quote 1 floor reply:
generally like this: device token is sent by the client to get your own server. When you need to push message, your server sends a push message with a device token to Apple's servers, Apple servers pushed under the device token to the corresponding client





Can I upload the application to the phone when the phone is not connected to external networks, is still able to have direct access to the device token, how it was obtained from the apns? Give me the feeling that direct phone ios device token get it on?

No comments:

Post a Comment