Currently, we’re digging up the actual Safari versions and using those to identify the Safari version. I disagree with this approach. The Safari version number not only doesn’t appear anywhere visibly, but the one place where it does appear (the user agent string) does not always change even though the browser has new features.
For example, WebRTC support landed in iOS 11.2. However, the version number of Safari as described in the user agent remains unchanged from iOS 11.1.2 through 11.2.1, as seen in the user agent strings below:
Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0 Mobile/15B202 Safari/604.1 Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_1 like Mac OS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0 Mobile/15C153 Safari/604.1 Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1
See how they’re all are version 11.0? Even my iPhone running iOS 11.4.1 beta is reporting that Safari is version 11.0.
That means that in order to properly assign compatibility information for features in iOS on Safari, we need to use the iOS version number, not the Safari one.