SRGSSR / srgletterbox-apple

The official SRG SSR media playback experience
https://srgssr.github.io/marketing/letterbox/
MIT License
14 stars 7 forks source link

Send consistent environment for diagnostic report #241

Closed pyby closed 3 years ago

pyby commented 3 years ago

Issue type

Feature request

Description of the problem

Builds used for pre-production should send the preprod value for environment in the diagnostic report.

tvOS builds only have a TestFlight distribution. The current code returns prod for the diagnostic environment.

A recommandation should be to use SRGAnalytics tracker environment, if the tracker is instanced, use it to have the same diagnostic environment. See https://github.com/SRGSSR/srganalytics-apple/issues/37.

Environment information

Reproducibility

Always reproducible

Steps to reproduce

  1. Play a media.
  2. Wait at least 30 seconds, the diagnostic report is sent.
  3. Verify the sent environment value.
defagos commented 3 years ago

I had a look at the branch, I just extracted the flag logic (as was already done for other flags).