Copyright Hé - License GPL

What is cfprefsd and why does it run on my Mac?

Computer science   2020-06-20 18:17:31

You are navigation Activity Monitor when you notice something called cfprefsd. What is it and should you care? Quick answer: No, cfpresfd is a central part of macOS, and you couldn"t use your computer without it. RELATED: What is this process and why is it running on my Mac? This article is part of our current series explaining various processes found in the activity monitor, such as kernel_task , hidd , mdsworker , installd , WindowServer , blued , launchd , backup , opendirectoryd , powerd , coreauthd , configd , mdnsponseer , UserEventAgent , nsurlstoraged , commerce , parental control , sandboxd , cloudd and many others . You don"t know what these services are? Better start reading! Today"s process, cfprefsd, is a daemon, which means it runs in the background and manages system tasks. You can usually identify demons by the d at the end. This specific daemon allows macOS and your applications to read and write preferences files. What does cfprefsd do To quote from the manual page,which you can display by typing man cfprefsd in Terminal: cfprefsd provides preference services for the CFPreferences and NSUserDefaults APIs. It"s a bit confusing if you don"t know what CF preferences are and NSUserDefaults are, so let"s take a quick look at them. The CF in CFPreferences stands for Core Foundation. According to the documentation for Apple developers , Core Foundation is the way your Mac manages to both system and application-specific preferences. : Core Foundation provides a simple, standard way to manage user (and application) preferences. Core Foundation stores preferences as key-value pairs that are assigned a range using a combination of user name, application ID, and host namese (computer). This allows you to save and retrieve preferences that apply to different classs of users. Basically, every time your computer creates or edits a .plist file inside the hidden library folder on your Mac , it"s CFPreferences that makes this happen. "style = " max- height: 400px; max-width: 99%; " > NSUserDefaults, on the other hand, is a related system that allowsprograms to access your default settings. If you have configured your computer to use inches and degrees Celsius, I am confused by your choices. However, your applications are not, as they can use NSUserDefaults to find out which options you have selected. To quote again the Apple Developer documentation : The NSUserDefaults class provides a programmatic interface for interacting with the default system. The default system allows an application to customize its behavior to suit a user"s preferences. For example, you can allow users to specify their preferred units of measurement or media playback speed. Applications store these preferences by assigning values ​​to a set of parameters in a user"s default database. To sum up: cfprefsd is a daemon used by macOS and applications to create and edit preferences files. It is also used to ensure that applications respect your system-wide default settings. What to do if cfprefsd uses more CPU power This process shouldn"t use a lot of CPU power, because it has a fairly simple job. If so, the culprit is probably an app that you installed recently. As we sa id, cfprefsd is used by both macOS and your individual applications. RELATED: How To Reset Any Mac Application To Its Default Settings If You Have recently installed something, try closing this app and see if it helps. If so, you may be dealing with a corrupt .plist file. Remember to delete thesettings for this application using AppCleaner , or manually deleting any .plist files you find for the application in the Library folder. If that doesn"t help, you"ve found a bug; contact the developer of the problematic application. Photo credit: guteksk7 /