Safari on iOS 15.2 reports it's user agent as Safari 6 on iOS7 (!)
I have a client with an iPhone X, updated to iOS 15.2 that for some reason reports it's Safari user agent as:
Mozilla/5.0 (iPhone; CPU iPhone OS the 7_0 like Mac OS X) AppleWebKit/546.10 (KHTM, like Gecko) Version/6.0 Mobile/7E18WD Safari/8536.25
Aka, Safari version 6.0 on iOS 7 - this is just totally incorrect in all ways possible and is causing multiple issues with almost all websites she tries to use.
The weird thing, is that this users iPhones have exhibited weird Safari errors for multiple generations of hardware - and I'm only now realizing, that this incorrect user agent reporting, is to blame.
One example is googles main search page that default to an older layout due to the ancient user agent reported and the same issues appeared on her iPhone 7 before she upgraded to the iPhoneX. This issue in other words seems to have permeated through the "upgrade to new iOS-device"-helper.
When hooking up the phone to a Mac and changing the user agent manually to a current version of safari via safaris developer menu, all works fine, and as soon as the phone is unplugged or the user agent is reset to the "default" setting, it falls back to reporting itself as Safari 6.
The question is then, how do I go about fixing this? The issue seems to permeate through the "transfer to new iOS-device" process, so a full reset and restore might not do a whole lot. And completely resetting her device, forcing the user to manually install every app again isn't a very comfortable solution.
Is there some file in the ~/Library that could have become write protected and that keeps surviving upgrades and backup transfers? Could I somehow access this deep into the file system using for example Xcode? This is quite the mystery.
A similar issue was reported for Safari on Mac OS here:
https://discussions.apple.com/thread/252370710
Help me out here! :)