AFAIK the only way to get the environment in which the app is running is by parsing the embedded provisioning profile inside the app and retrieve the value for aps-environment, but its format is proprietary and subject to change.
It is my understanding that the proper way to do is to try and send the notification on the production environment by default and fallback on the development environment if that fails. I have yet to find a confirmation for this but if we take a successful notification service like firebase that does not ask for an environment value, I don’t see how else they’d do it.
Topic:
App & System Services
SubTopic:
Notifications
Tags: