Skip to content

Instantly share code, notes, and snippets.

@dreness
Created October 14, 2023 13:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dreness/7983da493f640d1f57d3581aadcc821b to your computer and use it in GitHub Desktop.
Save dreness/7983da493f640d1f57d3581aadcc821b to your computer and use it in GitHub Desktop.
LaunchEvents -> com.apple.notifyd.matching
find /System/Library/LaunchDaemons /System/Library/LaunchAgents -name "*.plist" \
| while read p ; do plutil -convert json -o - ${p} \
| jq -r ' .. | objects | with_entries(select(.key == "Notification")) | select(. != {}).Notification'
done | sort -u > ~/Desktop/all-launchd-notifications.txt
@dreness
Copy link
Author

dreness commented Oct 14, 2023

Various parts of macOS emit system-wide notifications when certain events occur. Using notifyutil you can subscribe to these events, e.g. sudo notifyutil -w com.apple.MediaRemote.nowPlayingApplicationIsPlayingDidChange. In the below example, I listen for three different notification event types, then press the play / pause button on my keyboard a couple times.

% sudo notifyutil -w com.apple.MediaRemote.nowPlayingApplicationIsPlayingDidChange \
  -w com.apple.sessionagent.screenIsLocked \
  -w com.apple.system.powersources.source \
com.apple.MediaRemote.nowPlayingApplicationIsPlayingDidChange
com.apple.MediaRemote.nowPlayingApplicationIsPlayingDidChange

Below is the output of list_launchd_notifications.sh

ABAddressBookMeCardChangeDistributedNotification
ACDAccountStoreDidChangeNotification
AFAssistantEnablementDidChangeDarwinNotification
AFLanguageCodeDidChangeDarwinNotification
AppleDatePreferencesChangedNotification
AppleLanguagePreferencesChangedNotification
AppleNumberPreferencesChangedNotification
ApplePreferredContentSizeCategoryChangedNotification
AppleTimePreferencesChangedNotification
CKAccountChangedNotification
CKIdentityUpdateNotification
CPInstalledProfilesDidChangeNotification
CalSyncClientBeginningMultiSave
CalSyncClientFinishedMultiSave
EKNotificationCountChangedExternallyNotification
FMDSecureLocationsReceivedCommand
FMDSecureLocationsReceivedPayload
FMFDevicesChangedNotification
FMFMeDeviceChangedNotification
FMLFollowersChangedNotification
HKHealthDaemonActiveDataCollectionWillStartNotification
INVoocabularyChangedNotification
MPStoreClientTokenDidChangeNotification
ManagementStateStateDidChange
PCPreferencesDidChangeNotification
RTLocationsOfInterestDidChangeNotification
SLSharedWithYouAppSettingHasChanged
SLSharedWithYouSettingHasChanged
SUPreferencesChangedNotification
SignificantTimeChangeNotification
_CDPWalrusStateChangeDarwinNotification
_CalDatabaseChangedNotification
__ABDataBaseChangedByOtherProcessNotification
com.apple.AOSNotification.FMIPStateDidChange
com.apple.AirTunes.DACP.device-prevent-playback
com.apple.AirTunes.DACP.devicevolume
com.apple.AirTunes.DACP.devicevolumechanged
com.apple.AirTunes.DACP.mutetoggle
com.apple.AirTunes.DACP.nextitem
com.apple.AirTunes.DACP.pause
com.apple.AirTunes.DACP.play
com.apple.AirTunes.DACP.previtem
com.apple.AirTunes.DACP.repeatadv
com.apple.AirTunes.DACP.shuffletoggle
com.apple.AirTunes.DACP.volumedown
com.apple.AirTunes.DACP.volumeup
com.apple.AppleMediaServices.deviceOffersChanged
com.apple.BiometricKit.connectedAccessoriesChanged
com.apple.CallHistoryPluginHelper.launchnotification
com.apple.Carousel.wristStateChanged
com.apple.CloudSubscriptionFeature.Changed
com.apple.EscrowSecurityAlert.record
com.apple.EscrowSecurityAlert.reset
com.apple.EscrowSecurityAlert.server
com.apple.InstallerDiagnostics.ReportFactoryInstall
com.apple.Kerberos.cache.changed
com.apple.LaunchServices.ApplicationsChanged
com.apple.LaunchServices.DatabaseChange
com.apple.LockdownMode.accountChanged
com.apple.MCX._managementStatusChangedForDomains
com.apple.ManagedClient.ActivationLockAllowedStateDidChange
com.apple.ManagedConfiguration.profileListChanged
com.apple.MediaRemote.nowPlayingApplicationIsPlayingDidChange
com.apple.MediaRemote.nowPlayingInfoDidChange
com.apple.MobileAccessoryUpdater.defaultClient.restartPending
com.apple.MobileAsset.AutoAssetAtomicNotification^ATOMIC_INSTANCE_DOWNLOADED
com.apple.MobileAsset.EmbeddedSpeechMac.ma.new-asset-installed
com.apple.MobileAsset.KextDenyList.ma.new-asset-installed
com.apple.MobileAsset.SecureElementServiceAssets.ma.cached-metadata-updated
com.apple.MobileAsset.SecureElementServiceAssets.ma.new-asset-installed
com.apple.MobileAsset.TTSAXResourceModelAssets.ma.new-asset-installed
com.apple.MobileAsset.TimeZoneUpdate.ma.cached-metadata-updated
com.apple.MobileAsset.TimeZoneUpdate.ma.new-asset-installed
com.apple.MobileAsset.VoiceServices.CustomVoice.ma.new-asset-installed
com.apple.MobileAsset.VoiceServices.GryphonVoice.ma.new-asset-installed
com.apple.MobileAsset.VoiceServices.VoiceResources.new-asset-installed
com.apple.MobileAsset.VoiceServicesVocalizerVoice.ma.new-asset-installed
com.apple.MobileAsset.VoiceTriggerAssetsASMac.ma.new-asset-installed
com.apple.MobileAsset.VoiceTriggerAssetsASMac.new-asset-installed
com.apple.MobileAsset.VoiceTriggerAssetsMac.ma.new-asset-installed
com.apple.MobileAsset.VoiceTriggerAssetsMac.new-asset-installed
com.apple.PlatformSSO.unlock
com.apple.Preferences.ResetPrivacyWarningsNotification
com.apple.ProtectedCloudStorage.mobileBackupStateChange
com.apple.ProtectedCloudStorage.rollBackupDisabled
com.apple.ProtectedCloudStorage.rollIfAged
com.apple.ProtectedCloudStorage.rollNow
com.apple.ProtectedCloudStorage.test.mobileBackupStateChange
com.apple.ProtectedCloudStorage.updatedKeys
com.apple.SafariShared.Assistant.reload_plugin
com.apple.SafeEjectGPUStartupDaemon
com.apple.SafeEjectGPUStartupDaemon.received
com.apple.ScreenTimeAgent.SettingsDidChangeNotification
com.apple.SiriTTSTrainingAgent.taskEvent.cancelled
com.apple.SiriTTSTrainingAgent.taskEvent.done
com.apple.SiriTTSTrainingAgent.taskEvent.event
com.apple.SiriTTSTrainingAgent.taskEvent.failed
com.apple.SiriTTSTrainingAgent.taskEvent.running
com.apple.SiriTTSTrainingAgent.taskEvent.submitted
com.apple.SiriTTSTrainingAgent.taskEvent.undefined
com.apple.SoftwareUpdate.BadgingCountChanged
com.apple.SoftwareUpdate.CheckForCatalogChange
com.apple.SoftwareUpdate.OSXAvailable
com.apple.SoftwareUpdate.SUPreferencesChanged
com.apple.SoftwareUpdate.TriggerBackgroundCheck
com.apple.SoftwareUpdate.updatesAvailable
com.apple.SoftwareUpdateNotificationManager.wakeup
com.apple.StoreServices.StorefrontChanged
com.apple.SynthesisProvider.updatedVoices
com.apple.TVScreenSaver.IdleScreenRefreshIntervalChanged
com.apple.TVScreenSaver.IdleScreenScreenSaverTypeChanged
com.apple.TVScreenSaver.PhotosSharingFilterChanged
com.apple.TVScreenSaver.RequestMemoriesRefresh
com.apple.TextInput.RemoveAllDynamicDictionariesNotification
com.apple.UsageTrackingAgent.registration.application
com.apple.UsageTrackingAgent.registration.now-playing
com.apple.UsageTrackingAgent.registration.video
com.apple.UsageTrackingAgent.registration.web-domain
com.apple.VideoSubscriberAccount.DidRegisterSubscription
com.apple.VideosUI.PlayHistoryUpdatedNotification
com.apple.VideosUI.StoreAcquisitionCrossProcessNotification
com.apple.VideosUI.UpNextRequestDidFinishNotification
com.apple.accessibility.cache.darken.system.colors.enabled
com.apple.accessibility.cache.differentiate.without.color
com.apple.accessibility.cache.enhance.background.contrast
com.apple.accessibility.cache.enhance.text.legibility
com.apple.accessibility.cache.invert.colors
com.apple.accessibility.cache.prefers.horizontal.text
com.apple.accessibility.cache.reduce.motion
com.apple.accessibility.prefers.horizontal.text
com.apple.accessoryUpdater.uarp.icloudcheckpending
com.apple.admin.userRecordChanged.userPicture
com.apple.airplay.passwordRequired
com.apple.airplay.problemDetected
com.apple.airplay.state
com.apple.ap.adprivacyd.canceltasks
com.apple.ap.adprivacyd.iTunesActiveAccountDidChangeNotification
com.apple.ap.adprivacyd.iTunesActiveStorefrontDidChangeNotification
com.apple.ap.adprivacyd.launch
com.apple.ap.adprivacyd.reconcile
com.apple.appstored.ActivitySubEntitlementsCacheUpdated
com.apple.appstored.AppStoreSubEntitlementsCacheUpdated
com.apple.appstored.HWBundleSubEntitlementsCacheUpdated
com.apple.appstored.MusicSubEntitlementsCacheUpdated
com.apple.appstored.NewsSubEntitlementsCacheUpdated
com.apple.appstored.PodcastSubEntitlementsCacheUpdated
com.apple.appstored.TVSubEntitlementsCacheUpdated
com.apple.appstored.iCloudSubEntitlementsCacheUpdated
com.apple.assistant.app_vocabulary
com.apple.assistant.siri_settings_did_change
com.apple.assistant.speech-capture.finished
com.apple.assistant.sync_data_changed
com.apple.assistant.sync_homekit_now
com.apple.assistant.sync_homekit_urgent
com.apple.assistant.sync_needed
com.apple.awd.launch.wifi
com.apple.awdd.ConfigChange
com.apple.awdd.anonymity
com.apple.bluetooth.connection
com.apple.bluetooth.daemonStarted
com.apple.bluetooth.pairing
com.apple.calendar.database.preference.notification.kCalPreferredDaysToSyncKey
com.apple.calendar.database.preference.notification.suggestEventLocations
com.apple.calendar.defaultAlarmChangedNotification
com.apple.calendar.preference.notification.changed
com.apple.callhistorysync.idslaunchnotification
com.apple.callkit.callcontroller.shouldconnect
com.apple.chatkit.groups.siri_data_changed
com.apple.classroomkit.settings-app-launched
com.apple.classroomkit.studentmigrator.request-studentd-launch
com.apple.cmfsyncagent.kvstorechange
com.apple.cmio.VDCAssistant.attach-notification
com.apple.contacts.CNContactStoreMeContactDidChangeNotification
com.apple.coreaudio.BorealisToggled
com.apple.coreduet.client-needs-help.coreduetd
com.apple.coreduet.client-needs-help.knowledge-agent
com.apple.corerecents.recentsd.kvstorechange
com.apple.corespotlight.developer.ReindexAllItems
com.apple.corespotlight.developer.ReindexAllItemsWithIdentifiers
com.apple.coretelephony.kvstorechange
com.apple.crashreporter.auto_submit_preference_changed
com.apple.crashreporter.third_party_submission_preference_changed
com.apple.ctk.first-slot
com.apple.da.tasking_changed
com.apple.dataaccess.checkHolidayCalendarAccount
com.apple.datamigrator.migrationDidFinish
com.apple.devicemanagementclient.managedAppleAccountChanged
com.apple.displaysmenu.tvAvailability
com.apple.dmd.agent.register
com.apple.dmd.budget.didChange
com.apple.dmd.iCloudAccount.didChange
com.apple.duetexpertd.sportsTeamsChanged
com.apple.eventkit.preference.notification.UnselectedCalendarIdentifiersForFocusMode
com.apple.fairplayd.resync-fpkeybag
com.apple.fakebuddy.launchnew
com.apple.fakebuddy.launchupdate
com.apple.family.family_updated
com.apple.gamecontroller.agent.launch
com.apple.gamepolicy.agent.launch
com.apple.gamepolicy.daemon.launch
com.apple.geoservices.siri_data_changed
com.apple.gpuwrangler.egpu.added
com.apple.gpuwrangler.egpu.hwadded
com.apple.gpuwrangler.egpu.removed
com.apple.gpuwrangler.egpu.removed.unsafe
com.apple.homekit.sync-data-cache-updated
com.apple.icloud.findmydeviced.fetch_additional_info
com.apple.icloud.findmydeviced.fetch_guid
com.apple.icloud.findmydeviced.fetch_spstats
com.apple.icloud.findmydeviced.update_auth
com.apple.icloud.fmip.lostmode.enable
com.apple.icloud.fmip.siri_data_changed
com.apple.icloud.searchparty.selfbeaconchanged
com.apple.icloud.spowner.evaluatelocalbeaconing
com.apple.icloudpairing.idslaunchnotification
com.apple.idsremoteurlconnection.idslaunchnotification
com.apple.idstransfers.idslaunchnotification
com.apple.imautomatichistorydeletionagent.prefchange
com.apple.intelligenceplatform.StorageSystem.Recovered
com.apple.iokit.hid.displayStatus
com.apple.jett.switch.environmentChange.idms.complete
com.apple.keystore.lockstatus
com.apple.kvs.store-did-change.com.apple.LockdownMode
com.apple.kvs.store-did-change.com.apple.accessibility.livespeech
com.apple.kvs.store-did-change.com.apple.bluetooth.cloud.settings
com.apple.kvs.store-did-change.com.apple.cloudsettings.appearance
com.apple.kvs.store-did-change.com.apple.cloudsettings.controlcenter
com.apple.kvs.store-did-change.com.apple.cloudsettings.datetime
com.apple.kvs.store-did-change.com.apple.cloudsettings.desktop
com.apple.kvs.store-did-change.com.apple.cloudsettings.displays
com.apple.kvs.store-did-change.com.apple.cloudsettings.gamecontroller
com.apple.kvs.store-did-change.com.apple.cloudsettings.general
com.apple.kvs.store-did-change.com.apple.cloudsettings.homescreen
com.apple.kvs.store-did-change.com.apple.cloudsettings.international
com.apple.kvs.store-did-change.com.apple.cloudsettings.keyboard
com.apple.kvs.store-did-change.com.apple.cloudsettings.languageregion
com.apple.kvs.store-did-change.com.apple.cloudsettings.mouse
com.apple.kvs.store-did-change.com.apple.cloudsettings.screensaver
com.apple.kvs.store-did-change.com.apple.cloudsettings.sound
com.apple.kvs.store-did-change.com.apple.cloudsettings.trackpad
com.apple.kvs.store-did-change.com.apple.iBooks
com.apple.kvs.store-did-change.com.apple.reminders
com.apple.language.changed
com.apple.livespeech.localprefschanged
com.apple.locationd.appreset
com.apple.locationd.authorization
com.apple.locationd.routine.leechedlocations
com.apple.locationd/Prefs
com.apple.lockout.lifecycle
com.apple.loginwindow.logoutNoReturn
com.apple.managedconfiguration.effectivesettingschanged
com.apple.mediaaccessibility.displayFilterSettingsChanged
com.apple.mobile.keybagd.first_unlock
com.apple.mobile.keybagd.lock_status
com.apple.mobile.lockdown.activation_state
com.apple.mobilecal.timezonechanged
com.apple.mobiletimerd.bedtimetest
com.apple.mobiletimerd.chargetest
com.apple.mobiletimerd.diagnostics
com.apple.mobiletimerd.goodmorningtest
com.apple.mobiletimerd.reset
com.apple.mobiletimerd.resttest
com.apple.mobiletimerd.waketest
com.apple.mobiletimerd.wakeuptest
com.apple.nanoregistry.devicedidpair
com.apple.nanoregistry.devicedidunpair
com.apple.nanoregistry.paireddevicedidchangecapabilities
com.apple.nanoregistry.paireddevicedidchangeversion
com.apple.nanoregistry.watchdidbecomeactive
com.apple.navd.wakeUpForHypothesisUpdate
com.apple.networkextension.app-paths-changed
com.apple.networkextension.apps-changed
com.apple.networkextension.nehelper-init
com.apple.networkserviceproxy.reset
com.apple.oah.did-install
com.apple.parsec-fbf.FLUploadImmediately
com.apple.photos.DidUpdateAutonamingUserFeedback
com.apple.photostream.idslaunchnotification
com.apple.powerlog.batteryServiceNotification
com.apple.powermanagement.idlesleeppreventers
com.apple.powermanagement.restartpreventers
com.apple.powermanagement.systempowerstate
com.apple.powermanagement.systemsleeppreventers
com.apple.powerui.requiredFullCharge
com.apple.powerui.smartcharge
com.apple.progressd.studentClassMembershipChanged
com.apple.rapport.CompanionLinkDeviceAdded
com.apple.rapport.prefsChanged
com.apple.remindd.nano_preferences_sync
com.apple.remotemanagement.accountsChanged
com.apple.sbd.kvstorechange
com.apple.screensharing.agent.launchd
com.apple.screensharing.idslaunchnotification
com.apple.screensharing.menuextra
com.apple.security.cloudkeychain.forceupdate
com.apple.security.cloudkeychainproxy.kvstorechange3
com.apple.security.itembackup
com.apple.security.octagon.joined-with-bottle
com.apple.security.octagon.peer-changed
com.apple.security.octagon.trust-status-change
com.apple.security.publickeyavailable
com.apple.security.publickeynotavailable
com.apple.security.secureobjectsync.circlechanged
com.apple.security.secureobjectsync.viewschanged
com.apple.security.tick
com.apple.security.view-change.PCS
com.apple.security.view-change.SE-PTC
com.apple.security.view-ready.SE-PTC
com.apple.sessionagent.screenIsLocked
com.apple.sessionagent.screenIsUnlocked
com.apple.shortcuts.daemon-wakeup-request
com.apple.shortcuts.runner-prewarm-request
com.apple.siri.ShortcutsCloudKitAccountAddedNotification
com.apple.siri.ShortcutsCloudKitAccountModifiedNotification
com.apple.siri.client.state.DynamiteClientState.siri_data_changed
com.apple.siri.cloud.storage.deleted
com.apple.siri.cloud.synch.changed
com.apple.siri.history.deletion.requested
com.apple.siri.preheat.quiet
com.apple.smartcharging.defaultschanged
com.apple.spotlight.SyndicatedContentDeleted
com.apple.spotlight.SyndicatedContentRefreshed
com.apple.spotlightui.prefschanged
com.apple.springboard.finishedstartup
com.apple.stockholm.se.mfd
com.apple.storelegacy.installassistant.autoinstall.wakeup
com.apple.studentd.configuration.didchange
com.apple.suggestions.prepareForQuery
com.apple.suggestions.settingsChanged
com.apple.symptoms.materialLinkQualityChange
com.apple.sysdiagnose.sysdiagnoseStarted
com.apple.system.clock_set
com.apple.system.config.network_change
com.apple.system.config.network_change.dns
com.apple.system.hostname
com.apple.system.loginwindow.delayedLoginItemsInitiated
com.apple.system.loginwindow.desktopUp
com.apple.system.loginwindow.likelyUserSessionExit
com.apple.system.loginwindow.logoutcancelled
com.apple.system.loginwindow.restartinitiated
com.apple.system.loginwindow.shutdownInitiated
com.apple.system.lowdiskspace.system
com.apple.system.power.performance_warning
com.apple.system.power.thermal_warning
com.apple.system.powermanagement.poweradapter
com.apple.system.powermanagement.useractivity2
com.apple.system.powermanagement.uservisiblepowerevent
com.apple.system.powersources.percent
com.apple.system.powersources.source
com.apple.system.thermalpressurelevel
com.apple.system.timezone
com.apple.system.verylowdiskspace.system
com.apple.systemsettings.extensions.didchange
com.apple.tcc.access.changed
com.apple.telephonyutilities.callservicesd.fakeincomingmessage
com.apple.telephonyutilities.callservicesd.fakeoutgoingmessage
com.apple.telephonyutilities.callservicesdaemon.connectionrequest
com.apple.timezone.prefschanged
com.apple.timezonesync.idslaunchnotification
com.apple.timezoneupdates.installednotification
com.apple.trial.NamespaceUpdate.FREEZER_POLICIES
com.apple.trial.NamespaceUpdate.NETWORK_SERVICE_PROXY_CONFIG_UPDATE
com.apple.trial.NamespaceUpdate.SIRI_DICTATION_ASSETS
com.apple.trial.NamespaceUpdate.SIRI_TEXT_TO_SPEECH
com.apple.trial.NamespaceUpdate.SIRI_UNDERSTANDING_ASR_ASSISTANT
com.apple.trial.NamespaceUpdate.SIRI_UNDERSTANDING_NL
com.apple.trial.NamespaceUpdate.SIRI_UNDERSTANDING_NL_OVERRIDES
com.apple.trial.bmlt.activated
com.apple.triald.new-experiment
com.apple.triald.system.wake
com.apple.triald.wake
com.apple.ttsasset.NewAssetNotification
com.apple.tv.TVWidgetExtension.Register
com.apple.tv.appRemoved
com.apple.voiceservices.notification.voice-update
com.apple.voicetrigger.EarlyDetect
com.apple.voicetrigger.PHSProfileModified
kAFPreferencesDidChangeDarwinNotification
kCalEventOccurrenceCacheChangedNotification
kFZACAppBundleIdentifierLaunchNotification
kFZVCAppBundleIdentifierLaunchNotification
kFaceTimeChangedNotification
kMRMediaRemoteNowPlayingExternalTouchBarInvocationNotification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment