问题
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