How would one determine which apple push notification server (APNS) is in use, from iOS application

I wish to include in my registration message to our server, a flag as to which APNS server is being used. sandbox or production. I wish to do this so that my code can simply look up the device token and notification server from the table of devices, so that continuing development can coexist with live devices.

The application does, in development, register properly, linking a customer ID in our system to the token string from the phone.

However, this does not allow me to determine programatically from our server which push notification server to use.

Answers


I'm not sure if I have your question right, but as per Apple's doc Local and Push Notification Programming Guide: The Notification Payload

Providers can specify custom payload values outside the Apple-reserved aps namespace.

So all you need to do is craft your custom payload to indicate which server the notification was pushed from, and read it when it gets to the App.


Need Your Help

SQL INSERT system date into table

java sql

I have created a table called "myTable" with a column called CURRENT_DATE and it's data type is "DATE". When I programatically update my table, I also want to place a timestamp or system date in the