现在的位置: 首页 > 综合 > 正文

查找MobileSafari WebKit revision number的方法

2013年06月15日 ⁄ 综合 ⁄ 共 1093字 ⁄ 字号 评论关闭

Mobile Safari是开源的Mac Safari的iOS版本,然而iOS WebKit并不完全开源,只公开了部分的WebCore和JavaScriptCore。有时需要知道iOS Safari的WebKit revision number是对应www.webkit.org上的哪个,可以这么看。

用Mobile Safari打开http://www.whatsmyuseragent.com,可以得到UA。

例如iOS7 simulator developer preview的结果为:

Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.40 (KHTML, like Gecko) Version/6.0 Mobile/11A4372q Safari/8536.25

iPad Mini的结果为:

Mozilla/5.0 (iPad; CPU OS 6_1_2 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B146 Safari/8536.25

UA中有这样的字段:

AppleWebKit/537.40
AppleWebKit/536.26

然后可以用SVN工具查看WebKit的repository,例如用TortoiseSVN查看 http://svn.webkit.org/repository/webkit/branches

会看到一些分支名字有数字用来做联系。

iOS7的UA“AppleWebKit/537.40”对应http://svn.webkit.org/repository/webkit/branches/safari-537.43-branch分支。 (差了0.03是因为开发者预览版模拟器里的Safari非正式版)
iOS6.1的UA“AppleWebKit/536.26”对应http://svn.webkit.org/repository/webkit/branches/safari-536.26-branch分支。

接下来,对其中一个分支show log,例如:safari-537.43-branch

从log可知, iOS7.0 developer preview的Mobile Safari所用的WebKit版本在151299左右。

还有一种方法是查看release目录:

这里直接就有Safari的版本号作为分支名字了。不过release分支不及时,现在iOS7出预览版时还没有release。

转载请注明出处:http://blog.csdn.net/hursing

抱歉!评论已关闭.