02-10-2022 01:51 PM - edited 02-11-2022 08:06 AM
The Safari 15.3 release on 2022-02-10 marks what I believe is the 3rd time in a little less than a year that Apple has released an update to Safari with the same version number as the previous release but with a new build number. This means that the CFBundleShortVersionString normally used to identify an app version is useless to determine the actual version of Safari 15.3 installed.
For anyone who wants to create a Smart Group that can differentiate between Safari releases with the same version the EA below will extract the CFBundleVersion value, which is the Build number, from the Safari application bundle so you can use it as a Criteria.
For the new Safari 15.3 release the build number is 16612.4.9.1.8 on macOS Big Sur and 15612.4.9.1.8 on macOS Catalina.
<?xml version="1.0" encoding="UTF-8"?><extensionAttribute>
<displayName>EA - Get Safari CFBundleVersion</displayName>
<description>Get the full version string for Safari.app since Apple has made the CFBundleShortVersionString useless by repeatedly reusing the same value with different Production builds.</description>
<dataType>string</dataType>
<scriptContentsMac>#!/bin/sh
# EA - Get Safari CFBundleVersion
result="Not Installed"
PListToCheck="/Applications/Safari.app/Contents/Info.plist"
if [ -f "$PListToCheck" ] ; then
result=$( /usr/bin/defaults read "$PListToCheck" CFBundleVersion )
fi
echo "<result>$result</result>"</scriptContentsMac>
</extensionAttribute>
Posted on 02-14-2022 05:06 AM
Literally was on my list to do today. Thanks for this! Why does Apple make management so hard.
Posted on 02-14-2022 07:24 AM
I'd answer that question but I don't think the Jamf Nation moderators would appreciate the profanity it would involve. (Smile emoji omitted intentionally)
Posted on 02-14-2022 07:50 AM
Out of curiosity, are you deploying with a policy, or did you make a custom title in Title Editor? We went with a custom title for "Safari (Big Sur)" here...
Posted on 02-14-2022 10:32 AM
Currently it's a Policy installable via Self Service (and there's a Self Service notification that it's a needed update). It'll become a push policy if our Vulnerability Management team makes that call.
04-07-2022 02:11 AM - edited 04-07-2022 02:13 AM
@sdagley I need some help. I have tried to add the script above in an EA in Jamf but I can't seem to get any information back in Jamf. Am I missing some thing?
Posted on 04-07-2022 05:41 AM
@Tildo My post is in the .xml export format for an EA. You need to save the text to a file on your machine (use a .xml extension) then use the Upload button on the Computer Management->Extension Attributes page in your JSS console to import the EA.
Posted on 04-07-2022 08:26 AM
Thank you