I have an ionic2 ios app which connects to backend.
There are two backend servers 1 staging and 2 production.
I want to use different URL to connect to backend based on from where the app is running. For example, if the user is running the app from testflight then it should use staging URL and connect to staging backend. If the app is running from app store installed version then it should use production URL and connect to production backend.
For this I want to detect from where the app is running in my ionic2 code. Any way to achieve this?