<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenSaver",
  "identifier" : "/documentation/ScreenSaver/ScreenSaverDefaults",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Screen Saver"
    ],
    "preciseIdentifier" : "c:objc(cs)ScreenSaverDefaults"
  },
  "title" : "ScreenSaverDefaults"
}
-->

# ScreenSaverDefaults

A class that defines a set of methods for saving and restoring user defaults for screen savers.

```
class ScreenSaverDefaults
```

## Overview

[`ScreenSaverDefaults`](/documentation/ScreenSaver/ScreenSaverDefaults) gives you access to preference values you need to configure your screen saver. Because multiple apps can load a screen saver, you can’t use the standard <doc://com.apple.documentation/documentation/Foundation/UserDefaults> object to store preferences. Instead, instantiate this class using the [`init(forModuleWithName:)`](/documentation/ScreenSaver/ScreenSaverDefaults/init(forModuleWithName:)) method, which takes your screen saver’s bundle identifier as a parameter. The resulting object gives you a way to store your preference values and associate them only with your screen saver. Use the inherited <doc://com.apple.documentation/documentation/Foundation/UserDefaults> methods to load, store, or modify values.

## Topics

### Creating the screen saver defaults

[`init(forModuleWithName:)`](/documentation/ScreenSaver/ScreenSaverDefaults/init(forModuleWithName:))

Returns a screen saver defaults instance that reads and writes defaults for the specified module.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)