What version of mobile safari comes with each version of iOS?
Solution 1:
Since this is already the top hit on Google, we should start a list here. I'll make this answer a community wiki. By the way, I'm pulling these from the device's user agent string. Browser version is iOS version dependent, NOT device dependent. But when a phone doesn't support higher iOS versions it is listed:
3.2.2 - Mobile Safari 4.0.4
4.3.3 - Mobile Safari 5.02 - iPhone 3g
5.0 - Mobile Safari 5.1
5.1 - Mobile Safari 5.1
6.0 - Mobile Safari 6.0 - iPhone 3gs
7.1 - Mobile Safari 7.1 - iPhone 4
8.3 - Mobile Safari 8.0
9.2.1 - Mobile Safari 9.0 - iPhone 4s
10.3.4 - Mobile Safari 10.0 - iPhone 5
11.2.5 - Mobile Safari 11.0
12.1.4 - Mobile Safari 12.0
12.4.4 - Mobile Safari 12.1 - iPhone 5S, 6
13.0 - Mobile Safari 13.0
[...] - [...]
15.2 - Mobile Safari 15.2
Solution 2:
This guy's list is really useful: http://www.somegeekintn.com/blog/stuff/iosvers/
If you need the additional info, you can decode the Safari versions on useragentstring.com, e.g:
http://www.useragentstring.com/Safari5.0.2_id_18120.php explains that Safari version 6533.18.5 is known as "Safari 5.0.2"
Solution 3:
I couldn't find a comprehensive list either. The best thing I've found so far is some Safari documentation from Apple:
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html
Good luck!
[Update]
While this still doesn't answer the question it at least tells when WebKit added support for getBoundingClientRect()
in Febuary of 2009.
http://trac.webkit.org/changeset/40837
Solution 4:
Rather than doing device or os detection, you should be doing feature detection -- it'll provide a much richer experience, and you can provide custom code to add functionality that the specific version doesn't support. This way you'll provide support way beyond the specific devices you're targeting (and it usually ends up being easier since rather than branching your code for a specific user-agent, you're back-filling support for older js implementations by providing forward-looking support on a conditional basis).
For example, the latest version of desktop & mobile Safari do not provide .bind()
functionality to bind a context to a closure. This can be detected and handled using Function.prototype.bind
and if it doesn't exist, providing an implementation that provides the functionality to older browsers. Using a library like http://www.modernizr.com/ will assist greatly in this endeavor.
That being said there are some specific DOM events which are tied to certain versions of iOS: http://developer.apple.com/library/safari/navigation/#section=Libraries&topic=Safari%20DOM%20Additions%20for%20iOS