-
Notifications
You must be signed in to change notification settings - Fork 188
targetedOSVersionsRule
As Nudge continues to be used in organizations, more complex nudge events will occur. targetedOSVersionsRule
is a new key for Nudge v1.1.0 and higher, allowing you to have multiple nudge events concurrently.
Rules take the following precedence:
- Full OS Match
- Device is running 11.5.1
- targetedOSVersionsRule value is 11.5.1
- Major OS Match
- Device is running 11.5.1
- targetedOSVersionsRule value is 11
- Default Match
- Device is running 11.5.1
- targetedOSVersionsRule value is
default
or targetedOSVersionsRule key is not present
Passing identical rules will result in "undefined" behavior. Currently, the last identical rule will be honored.
In this example, you have two "default" rules, one being explicitly defined with targetedOSVersionsRule
and one without the key. The device will have an effective requiredInstallationDate
of 2021-07-30T00:00:00Z
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-08-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2"
},
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-07-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "default"
}
]
}
In this example you have two Major OS Match
rules. The device will have an effective requiredInstallationDate
of 2021-07-30T00:00:00Z
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-08-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "11"
},
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-07-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "11"
}
]
}
If you are only deploying a single Nudge event, the configuration is quite simple
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-07-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2"
}
]
}
An alternative configuration which is technically identical
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-07-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "default"
}
]
}
You may find yourself in a situation where Apple releases a minor update that you want people to install, but it is not critical to the safety of your organization. 11.5.2 might be a perfect example of this.
If you find yourself in the middle of an active Nudge event, say 11.5.1, and a new version comes out, you may want to enforce 11.5.2 for anyone who hasn't installed 11.5.1 yet, while not punishing your users.
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://support.apple.com/en-us/HT211896",
"requiredInstallationDate": "2021-09-15T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "11.5.1"
},
{
"aboutUpdateURL": "https://support.apple.com/en-us/HT211896",
"requiredInstallationDate": "2021-08-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2"
}
]
}
With the imminent release of macOS Monterey, you may want a minimum OS version for both Big Sur and Monterey.
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://support.apple.com/en-us/HT211896",
"requiredInstallationDate": "2021-08-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "11"
},
{
"aboutUpdateURL": "https://www.apple.com/macos/monterey-preview/",
"requiredInstallationDate": "2021-10-30T00:00:00Z",
"requiredMinimumOSVersion": "12.0.1",
"targetedOSVersionsRule": "12"
}
]
}
In order to have a configuration that can work with all current versions of Nudge, your primary Nudge event must be the first dictionary of your osVersionRequirements
key.
Good example
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-07-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersions": [
"11.0",
"11.0.1",
"11.1",
"11.2",
"11.2.1",
"11.2.2",
"11.2.3",
"11.3",
"11.3.1",
"11.4",
"11.5",
"11.5.1"
],
"targetedOSVersionsRule": "default"
},
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-08-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "11.5.1"
}
]
}
Bad example
{
"osVersionRequirements": [
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-08-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersionsRule": "11.5.1"
},
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2021-07-30T00:00:00Z",
"requiredMinimumOSVersion": "11.5.2",
"targetedOSVersions": [
"11.0",
"11.0.1",
"11.1",
"11.2",
"11.2.1",
"11.2.2",
"11.2.3",
"11.3",
"11.3.1",
"11.4",
"11.5",
"11.5.1"
],
"targetedOSVersionsRule": "default"
}
]
}