Hi i'm developping an ionic 3 app and i'd like to know the version of Safari used in iOS simulators, anyone know how to get it ?
Do you want to know the user agent string? You can grab it by visiting one of many sites, eg: http://www.whatsmyua.info?
There's a great listing of Safari user agents at:
https://developers.whatismybrowser.com/useragents/explore/software_name/safari/
You can sort by version number, operating syste (OS X/iPad/iPhone etc)
iPhone simulator user agents will have the iPhone Simulator fragment in them, for example:
https://developers.whatismybrowser.com/useragents/parse/18845-safari-ios-iphone-webkit
Mozilla/5.0 (iPhone Simulator; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3
Related
TL;DR: Safari on Desktop sent a single request with an iPhone user agent and without cookies, and we don't know why. It uses FOUR different user agents.
I was using Safari 16.1 on macOS Ventura 13.1 to test a website that I built.
I found a strange request with an iPhone User Agent string in the server access log.
This request did not include any cookies, causing my session to end.
I am convinced that the request came from my browser because:
It is from my IP address, and I'm the only one here.
The request was 1 second before a request that I know I made, for the same URL.
The URL is several steps into a checkout process, so it is unlikely to be reached any other way (e.g. bots).
Requests before and after it had my expected desktop user agent (see screenshot).
But what is strange is:
There is only one request logged with the iPhone user agent string.
There are no iPhones or other Apple devices at this IP address, just a MacBook Air.
Safari can emulate other user agents, but I have never used that feature in Safari.
I did have the Safari Web Inspector open at the time, to watch a cookie.
The URL outputs some content with a JavaScript redirect, so it is actually not possible to stay on it to refresh it.
So why did desktop Safari change the user agent string to iPhone for a single request?
Is there some keyboard shortcut for switching user agent that I could have pressed accidentally?
Or is this a known behaviour of Safari? (like this other surprising user agent change)
UPDATE: During a short session, after updating to macOS Ventura 13.2 and Safari 16.3, Safari used 4 different user agents.
1 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15"
2 "Safari/18614.4.6.1.5 CFNetwork/1404.0.5 Darwin/22.3.0"
3 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)"
4 "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1"
(1) is the main user agent reported by most tools.
(2) requests apple-touch-icons, and I understand it.
(3) is a little shorter than the main one, and made only 3 simultaneous requests at the start of my session.
(4) contains "iPhone", and made 3 simultaneous requests at the same time as (3).
I am using aws-amplify 4.3.15(latest) in my react native application with enabled MFA. Now when I try to fetch the list of authorized devices, I do not get a proper result for Android devices.
cognitoUser.listDevices() gives me array of devices, but the DeviceAttribute device_name doesn't say Android or something like that. Instead, I get "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36". Also Sometime device_name is not at all there.
This is most probably an issue with device tracking and detection. Please help if anyone went through a similar situation.
I'd like to use Chrome to emulate different devices to run my frontend tests on different emulators. in the documentation, I found the following example
And driver.emulateDevice(375, 812, 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1')
where can I get a list of different options?
That is completely up to you, Karate just takes the string you provide and uses it "as is".
For further research into what that string is all about, you can refer this: https://wicg.github.io/ua-client-hints/
I have a HTML5 app that uses websql for storing data.
Where possible, I'm using the readTransaction() method for read-only SELECT queries, and the transaction() method for INSERT/UPDATE/DELETE queries.
I'm not sure if there's a performance benefit to using readTransaction(), but it seems like the right thing to do.
The app works fine on desktop Safari, Chrome, iPhone (iOS4)...but on the iPad (iOS 3.2), it doesn't. When I enable the debug console (Settings -> Safari -> Developer -> Debug Console), I can see that it's complaining that there's no readTransaction() method.
Can anyone confirm if the iPad only supports a subset of the HTML5 database API? Obviously the easy fix is to change all readTransaction() calls to transaction(), but I just was wondering if anyone knows why readTransaction() doesn't work on the iPad?
I can't find any reference to this discrepancy on developer.apple.com or anywhere else.
In order to get the confirmation, you have to cross several informations:
1) The User-Agent string for an iPad 3.2 is the following:
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
2) Safari 4.0.4 for iPad was released on April 2010, the 3rd (see http://en.wikipedia.org/wiki/Safari_version_history)
3) readTransaction was commited to the WebKit trunk on September 2009, the 9th (see http://trac.webkit.org/changeset/48227)
This is why the WebKit engine that power Safari 4.0.4 for iPad 3.2 does not support readTransaction.
Not sure I follow your logic here...you're saying that support for readTransaction was commited to the repository 15 months ago (Sep 09); and that the version of Safari in iOS3.2 was released 8 months ago (Apr 10)?
Unless I misunderstand you, that would mean that readTransaction support would have already been in the trunk for 7 months at the point Safari 4.0.4 was released.
Are you confusing Sep 09 with Sep 10, perhaps?
When someone accesses a site via a WebView in an iPhone app, is there a reliable way (JavaScript or server-side) to tell what app is being used? It seems like the user agent string can tell me if it's from Safari or not, but not what precise app is being used if it's not Safari, unless a custom user agent has been specified by the app's programmer (which is not often).
I'd like to be able to tell more precisely what exact app is being used in order to serve [slightly] customised content. The identifier doesn't need to be human-readable, just app-sepcific (so e.g. a bundle ID would be fine).
Example (and not useful) user agents:
From Safari: "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16"
Most Apps:
"Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Mobile/7D11"
I tried to write just "Nope", but answers are required to be at least 15 characters long...