SFSafariViewController user agent

Hi,

We're trying to detect the browser accessing our OAuth provider via the user agent string. Our application resolves the browser as "Mozilla", I'm assuming because Safari is not specified in the user agent string for the SFSafariViewController. Here is the user agent string from the SFSafariViewController


"Mozilla/5.0 (iPad; CPU OS 9_0 like Mac OS X) AppleWebKit/601.1.32 (KHTML, like Gecko) Mobile/13A4254v"


Here is the user agent string from regular safari hitting the same endpoint


"Mozilla/5.0 (iPad; CPU OS 9_0 like Mac OS X) AppleWebKit/601.1.32 (KHTML, like Gecko) Version/8.0 Mobile/13A4254v Safari/600.1.4"


Is this a bug with the way our server application detects user agent strings, or a bug with how the SFSafariViewController sends user agent


Thanks

Hi Apple - We are also facing this problem. Can you also please let us know how we can go about setting a custom user agent when using SFSafariViewController?

I do not believe there is a way to specify the user agent string with SFSafariViewController.


Sounds like a good candidate for an enhancement request, which is how it will get into the Apple development pipeline.

SFSafariViewController user agent
 
 
Q