<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "ManagedSettings",
  "identifier" : "/documentation/ManagedSettings/PasscodeSettings",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Managed Settings"
    ],
    "preciseIdentifier" : "s:15ManagedSettings08PasscodeB0V"
  },
  "title" : "PasscodeSettings"
}
-->

# PasscodeSettings

Constraints on a user’s ability to change their device’s passcode.

```
struct PasscodeSettings
```

## Topics

### Blocking passcode changes

[`lockPasscode`](/documentation/ManagedSettings/PasscodeSettings/lockPasscode-swift.property)

A Boolean value that indicates whether to prevent changing the device passcode.

[`lockPasscode`](/documentation/ManagedSettings/PasscodeSettings/lockPasscode-swift.type.property)

The metadata for the setting that prevents the user from changing their passcode.



---

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)