title: How to identify the app running environment including Test Flight
body: <p>I'm developing iOS app and need to identify the environment where the app is running to classify the API endpoint. I want to know the app is running under whether production, simulator and also Test Flight.
  I've already done classifying production and simulator by User-defined setting, but am still not sure how I can identify Test Flight. 
  Any tips? thanks!</p>