<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/UserDefaults/argumentDomain",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSArgumentDomain"
  },
  "title" : "argumentDomain"
}
-->

# argumentDomain

The identifier for the domain that contains command-line settings.

```
class let argumentDomain: String
```

## Discussion

When someone launches your app from Xcode or the command-line, they can override setting
values using command-line arguments. The defaults system stores those overrides in this
domain, which is volatile and resets with each app launch. Values in this domain override
most other domains, including your app-specific settings.

To specify custom settings from the command line, add the `-default` parameter
to your command-line invocation followed by a *key=value* string with the key and value
you want to set.

---

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)