This article will show you how to Manage Catalina’s New Application Notification Preferences with a Config Profile.
Now that Catalina is live, MacAdmins have many questions. The top 3 questions I have seen so far are;
- 1. How do I block macOS Catalina from my users?
- 2. How do I Manage macOS Catalina Application Notifications?
- 3. What are the new
Screen Recording
andInput Monitoring
or Keystroke Receiving TCC Settings? (more on that in a new article.)
Catalina Application Notifications Index
- 1. Should I manage Application Notifications?
- 2. How do I reset or clear out previous Notification Settings?
- 3. How can I test the Notifications Profile?
- 4. Find Previous Bundle ID or App Domains from past Prompts
- 5. Manage Notifications with a Profile.
- 6. Notifications Profile with Profile Creator.
- 7. Notifications Profile with Manage App Notifications.bash
- 8. Credits
1. Should I manage Application Notifications?
This is a question you should ask yourself. Keep in mind, once you mange a profile setting it can not be changed by the user. Managing certain application notifications from Jamf Self Service is one example. You WANT the user to be able to see the notifications that it sends out. The user may miss something important, if they previously clicked DENY. For other applications, you might want to leave Notification decisions to the user.
2. How do I reset or clear out previous Notification Settings?
How do you reset Catalina’s Application Notifications if you clicked Allow or Deny already?
The settings are stored in a plist in the users /Library/Preferences
folder.
com.apple.ncprefs.plist
To reset all Notification Alerts, you can delete the plist and then restart. Once you get back to the desktop all your notifications will start popping up again.
3. How can I test the Notifications Profile?
After you create the profile and install it, any open notifications will immediately disappear! The best way to test your new profile is to delete ncprefs.plist
, then restart. Then you can leave any open notifications up on your desktop. Install the profile , then all the notifications that you manage should disappear.
4. Find Previous Bundle ID or Application Domains from past Prompts
If you want to see previous prompts that you have already answered try this command.
sqlite3 "$(getconf DARWIN_USER_DIR)/com.apple.notificationcenter/db2/db" "select * from app;"
4. Manage Notifications with a Profile.
The easiest way to manage Notification is with a Configuration Profile.
NOTE: If you use Jamf Pro, Notifications is not an option yet in 10.15.1.
I will show you two ways to create a Notifications Profile.
- 1. Erik Berglund’s – Profile Creator Application.
- 2. William Smith’s (talkingmoose) –Manage App Notifications.bash
5. Notifications Profile with Profile Creator.
Creating Profiles is easy with Profile Creator! The version that we will be using is v0.3.2 which has Catalina Options built right in. After installing you will see the welcome screen.
You can start by filling out the General Settings. Set the Name of the profile, Description, Company Name and Payload Scope. For the Payload Scope select System
if you want the settings to be for all users. You can add Prevent users from removing this profile (Supervised)
Once you have the General Settings set you can add a new profile payload. Scroll down on the left hand side until you see macOS
. You will then see Notifications
.
To start you will need to add the Notifications Payload Key. Click the + button on the left hand side of Notification Settings
.
Now that Notifications Settings is active you can add new keys. Click the + button to add a new Key.
Now you can view the different settings you can set.
- 1. Enable Notifications
- 2. Bundle Identifier for the target app
- 3. Show app in Notifications Center
- 4. Show Notifications at the Lock Screen
- 5. Notification Sounds Allowed
- 6. Allow Badges
- 7. Alert Type – None, Banners, Alerts
- 8. Enable Critical – If the banner can pass through DND
The option that you will need to find is the Application Bundle Identifier. An example would be Microsoft Outlook. The Bundle ID for Outlook is com.microsoft.outlook
. How do you find the Bundle ID ?
You can find many ways to find the Application Bundle ID. I will show you 3 different ways to do this. One of the best ways is to look directly at the application info.plist
. Run the following all on one line. Let’s check to see what Safari’s Bundle ID is.
1. PlistBuddy
/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/Safari.app/Contents/Info.plist
com.apple.Safari
2. lsappinfo
lsappinfo info -only bundleid Google\ Chrome
"CFBundleIdentifier"="com.google.Chrome"
3. mdls
mdls -name kMDItemCFBundleIdentifier -r /Applications/Remote\ Desktop.app
com.apple.RemoteDesktop
Now that you have the Bundle ID, plug it into the 2nd box in the key options.
You can now add as many keys as you want!
Once you have finished adding all the Bundle ID’s you are ready to Add this payload to the main Profile and save it. Click the Add
Button in the upper right hand corner.
You should now see this in the upper left hand corner.
Now click on the upload button on the right hand side of the + button to save your new profile.
This is the save menu. Check over the settings to verify everything is correct.
NOTE: Just as the note says at the bottom. If you use Jamf Pro you need to Sign the profile with your Apple Developer ID. If you use any other MDM you do not have to do this.
You will now have a file called 10.15 Notifications.mobileconfig
You can now upload it to your MDM Server.
After installing the profile you can go into system preferences > Profiles and view the new profile. It will look something like this.
You can then scroll down to verify all the macOS Catalina Application Notifications settings.
6. Notifications Profile with Manage App Notifications.bash
William Smith aka (talkingmoose) just wrote an amazing bash script that will generate a Notifications.mobileconfig
You can find the script on William’s Github
All you have to do is run the script. You will be prompted at each step.
- Drag and drop the app into Terminal (will auto fill the bundle ID info!)
- Allow Notifications
- Show Notifications on the Lock Screen
- Show In Notification Center
- Badge App Icon
- Play Sound
- Critical Alerts (Past DND)
- Upload to Jamf Pro or Save to Desktop
- Would you like to View the Profile.
The only limiting part of this script is that you can only set one application per profile. William has mentioned that he might look into adding the ability to add multiple application notification settings into one profile. If you would like this, please send him this feedback!
7. Credits
A big Thank You goes out to the following MacAdmins.
- @stevemasser – For finding the Notifications Preference plist Location.
- @roberthammen & @emily for Confirming that current notifications will disappear immediately when the profile is installed.
- @eholtam for finding the neat sqlite3 trick for showing previously answered notifications.
If you have any questions or comments on macOS Catalina Application Notifications, please don’t hesitate to Contact Me!
Hello! Just wanted to follow up that I finally got around to updating NCUtil for Mojave+ https://github.com/drewdiver/ncprefs.py that can allow some scripting of NC settings.
Thank you Drew!!!
Apple’s Enterprise Connect support team figured out this behavior when I reported a problem with Enterprise Connect not showing the usual prompt to log in when connected to our corporate network. It has been recommended I file a Feedback report on it, and then create an AppleCare Enterprise case referencing the Feedback case so it gets more attention. Before I do that I’d like to see if anyone else can find a case where the specifying the wrong Alert type in a profile triggers the same behavior in something besides Enterprise Connect.
From the lessons learned the hard way department: If you have an app that wants to present an Alert type notification, and you have installed a Configuration Profile with a Notification Settings payload for that app specifying the Alert Type is Banner, then no Alert will be displayed.
Steve, I did not even think about this situation. It almost sounds like a bug? Maybe you can let Apple know about this.
Have you tried blocking App Store notifications on older OS’s like macOS Mojave? We are repackaging Mac App Store application and not want users to get App Store update notifications, but only via our managed mechanism Jamf Pro self service.