Get the installed Safari version using AppleScript or Objective C

青春壹個敷衍的年華 提交于 2019-12-23 05:05:54

问题


How can I check the installed safari version on Mac? I need to provide temporary fix for Safari as my app didn't work on safari 5.0.6 and 5.1. So how can I detect these 2 version of safari...

i can find its version using webkit but based on this site: http://en.wikipedia.org/wiki/Safari_version_history

Safari 5.0.6 has the similar webkit as the previos version...


回答1:


If Safari is running this AppleScript will get the version:

tell application "Safari"
    set safariVersion to version
end tell



回答2:


You can do this even if Safari isn't running...

get version of application "Safari"



回答3:


You can read the version out of /Applications/Safari.app/Contents/version.plist.



来源:https://stackoverflow.com/questions/7155260/get-the-installed-safari-version-using-applescript-or-objective-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!