PayloadKit

Passcode

com.apple.mobiledevice.passwordpolicy

The payload that configures a passcode policy.

iOS 4.0+ · deprecated 27.0macOS 10.7+ · deprecated 27.0watchOS 10.0+ · deprecated 27.0visionOS 2.0+ · deprecated 27.0
Apple schemacombined

Configuration Keys (13)

Showing 13 of 13 keys

KeyTypeDescriptionDefaultRange

Allow simple value

iOS · visionOS

booleanIf 'false', the system prevents use of a simple passcode. A simple passcode contains repeated characters, or increasing or decreasing characters, such as '123' or 'CBA'.Default: trueRange: —

Require alphabetic value

iOS · visionOS · not on watchOS

booleanIf 'true', the system requires alphabetic characters instead of only numeric characters.Default: falseRange: —
minLengthinteger

Minimum passcode length

iOS · visionOS

integerThe minimum overall length of the passcode. This value is independent of the value for 'minComplexChars'.Default: 0Range: 0 – 16

Minimum number of complex characters

iOS · visionOS · not on watchOS

integerThe minimum number of complex characters that a passcode needs to contain. A complex character is a character other than a number or a letter, such as '&', '%', '$', and '#'. The system ignores this property for user enrollments.Default: 0Range: 0 – 4

macOS 14.0+ · not on iOS, watchOS, visionOS

dictSpecifies a regular expression, and its description, used to enforce password compliance. Use the simpler passcode restrictions whenever possible, and rely on regular expression matching only when necessary. Mistakes in regular expressions can lead to frustrating user experiences, such as unsatisfiable passcode policies, or policy descriptions that don't match the enforced policy.Default: —Range: —
required
stringA regular expression string that the system matches against the password to determine whether it complies with a policy. The regular expression uses the ICU syntax (https://unicode-org.github.io/icu/userguide/strings/regexp.html). The string must not exceed 2048 characters in length.Default: —Range: —
dictContains a dictionary of keys for supported OS language IDs (for example, "en-US"), and whose values represent a localized description of the policy enforced by the regular expression. Use the special 'default' key can for languages that aren't contained in the dictionary.Default: —Range: —
{{key}}string
string—Default: —Range: —
{{value}}string
stringA localized description.Default: —Range: —
ANYstring
stringA localized description.Default: —Range: —

Maximum passcode age

iOS · visionOS

integerThe number of days for which the passcode can remain unchanged. After this number of days, the system forces the user to change the passcode before it unlocks the device.Default: —Range: 1 – 730
pinHistoryinteger

Passcode history

iOS · visionOS

integerThis value defines N, where the new passcode must be unique within the last N entries in the passcode history.Default: —Range: 1 – 50

Reset passcode at next login

macOS 10.13+ · not on iOS, watchOS, visionOS

booleanIf 'true', the system causes a password reset to occur the next time the user tries to authenticate. If this key is set in a device profile, the setting takes effect for all users, and admin authentications may fail until the admin user password is also reset.Default: falseRange: —
forcePINboolean

Require passcode on device

iOS · visionOS

booleanIf 'true', the system forces the user to enter a PIN.Default: falseRange: —

Auto-lock

iOS · visionOS

integerThe maximum number of minutes for which the device can be idle without the user unlocking it, before the system locks it. When this limit is reached, the system locks the device and the passcode is required to unlock it. The user can edit this setting, but the value can't exceed the 'maxInactivity' value. On macOS, the system translates this inactivity value to screen-saver settings. The maximum value for macOS is '60'. Setting this key removes the 'never' option in the Settings UI on user enrolled devices.Default: —Range: 0 – 15

Grace period for device lock

iOS · visionOS

integerThe maximum grace period, in minutes, to unlock the phone without entering a passcode. The default is '0', which is no grace period and requires a passcode immediately. On macOS, the system translates this grace period value to screen-saver settings.Default: 0Range: —

Maximum number of failed attempts

iOS · visionOS

integerThe number of failed passcode attempts that the system allows the user before it erases or locks the device. After six failed attempts, the device imposes a time delay before the user can enter a passcode again. The time delay increases with each failed attempt. On macOS, set 'minutesUntilFailedLoginReset' to define the time delay. The time delay begins after the sixth attempt, so if 'MaximumFailedAttempts' is six or lower, the system has no time delay and triggers the erase or lock as soon as the user exceeds the limit. After the final failed attempt, the system locks a macOS device, or securely erases all data and settings from an iOS, visionOS, or watchOS device.Default: 11Range: 2 – 11

Delay after failed login attempts

macOS 10.10+ · not on iOS, watchOS, visionOS

integerThe number of minutes before the system resets the login after the maximum number of unsuccessful login attempts is reached. This key requires setting 'maxFailedAttempts'.Default: —Range: —