I am trying to implement a push notification server.
So far, I have my Push server code in place and Push Feedback Service code in place.
One of the thing with push notification I have read in other Stackoverflow post was that we should not use a development certificate signed push token in a production certificate environment otherwise Apple’s push server will disconnect our push notification server and prevent further push notification from getting through.
My question is, is it possible to use Objective C to detect which certificate the app was signed on launch?
On my server, I have a Token entity and one of the property was “environment” (either development or production).
At the moment, I am making the assumption that all submitted token is “development” token.
If I am able to find out which certificate (dev or prod) the app was signed with during app launch, then I could set the entity’s environment property accordingly.
Is it possible?
I use a predefined macro for that. In debug builds where the sandbox environment is used I define SANDBOX_ENVIRONMENT in the build settings.
That way I can add a parameter to the server call where the token is registered at the server.