Skip to content
Dan K. Snelson edited this page Jun 5, 2022 · 21 revisions

_language - Type: String, Default Value: ""

The targeted language locale for the user interface. This needs to be set so Nudge knows what language you're targeting! If you do not set this, changes to "Content" fields below will NOT be done!

Note: For a list of locales, please run the following command in Terminal: /usr/bin/locale -a Example: if using English - en is sufficient even though the command returns en_US

Note: To detect the language code your machine is using, please run the following command in Terminal: system_profiler SPInternationalDataType | grep "Language Code"


actionButtonText - Type: String, Default Value: ""

Modifies the actionButton, also known as the "Update Device" button


customDeferralButtonText - Type: String, Default Value: ""

v1.1.0 and later

Modifies the customDeferralButtonText, also known as the "Custom" button.


customDeferralDropdownText - Type: String, Default Value: ""

v1.7.0 and later

Modifies the customDeferralDropdownText, also known as the "Defer" button.


informationButtonText - Type: String, Default Value: ""

Modifies the informationButton, also known as the "More Info" button


mainContentHeader - Type: String, Default Value: ""

Modifies the mainContentHeader. This is the "Your device will restart during this update" text.


mainContentNote - Type: String, Default Value: ""

Modifies the mainContentNote. This is the "Important Notes" text.


mainContentSubHeader - Type: String, Default Value: ""

Modifies the mainContentSubHeader. This is the "Updates can take around 30 minutes to complete" text.


mainContentText - Type: String, Default Value: ""

Modifies the mainContentText. This is the "A fully up-to-date device is required to ensure that IT can your accurately protect your device.\n\nIf you do not update your device, you may lose access to some items necessary for your day-to-day tasks.\n\nTo begin the update, simply click on the button below and follow the provided steps." text.

Note: The python version of Nudge required three paragraphs. With the Swift version, this is no longer necessary. Simply pass two newlines (\n\n) to start a new paragraph. You can have as many or as few as you want, with the only limitation being window space. For Swift version nine lines of text is maximum before scrollview is shown, and 77 characters wide.

MobileConfig Note: Because of how Apple stores data about strings \n will be converted to \\n which is an escaped new-line. Nudge can work around this, but it is recommended to not use \n within the string. You will see in the proper way to cast this format in the Example (Mobile Configuration) section. Jamf Pro JSON Schema requires the use of \n.


mainHeader - Type: String, Default Value: ""

Modifies the mainHeader. This is the "Your device requires a security update" text.


oneDayDeferralButtonText - Type: String, Default Value: ""

v1.1.0 and later

Modifies the oneDayDeferralButtonText, also known as the "One Day" button.


oneHourDeferralButtonText - Type: String, Default Value: ""

v1.1.0 and later

Modifies the oneHourDeferralButtonText, also known as the "One Hour" button.


primaryQuitButtonText - Type: String, Default Value: ""

Modifies the primaryQuitButton, also known as the "Later" button


secondaryQuitButtonText - Type: String, Default Value: ""

Modifies the secondaryQuitButton, also known as the "I understand" button


subHeader - Type: String, Default Value: ""

Modifies the subHeader, also know as the "A friendly reminder from your local IT team" text.


Examples

Image

Nudge's userInterface : updateElements Field Names (before deadline)

JSON

{
  "userInterface": {
    "updateElements": [
      {
        "_language": "es",
        "actionButtonText": "Actualizar dispositivo",
        "informationButtonText": "Más información",
        "mainContentHeader": "Su dispositivo se reiniciará durante esta actualización",
        "mainContentNote": "Notas importantes",
        "mainContentSubHeader": "Las actualizaciones pueden tardar unos 30 minutos en completarse",
        "mainContentText": "Se requiere un dispositivo completamente actualizado para garantizar que IT pueda proteger su dispositivo con precisión.\n\nSi no actualiza su dispositivo, es posible que pierda el acceso a algunos elementos necesarios para sus tareas diarias.\n\nPara comenzar la actualización, simplemente haga clic en el botón Actualizar dispositivo y siga los pasos proporcionados.",
        "mainHeader": "Tu dispositivo requiere una actualización de seguridad",
        "primaryQuitButtonText": "Más tarde",
        "secondaryQuitButtonText": "Entiendo",
        "subHeader": "Un recordatorio amistoso de su equipo de IT local"
      }
    ]
  }
}

Mobile Configuration

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>PayloadContent</key>
    <array>
      <dict>
        <key>PayloadDescription</key>
        <string>Configures updateElements preferences</string>
        <key>PayloadDisplayName</key>
        <string>Nudge Preferences</string>
        <key>PayloadIdentifier</key>
        <string>com.github.macadmins.Nudge.preferences.example.userInterface.updateElements</string>
        <key>PayloadOrganization</key>
        <string></string>
        <key>PayloadType</key>
        <string>com.github.macadmins.Nudge</string>
        <key>PayloadUUID</key>
        <string>CA02957C-7472-446B-9F77-3E0414405556</string>
        <key>PayloadVersion</key>
        <integer>1</integer>
        <key>updateElements</key>
        <array>
          <dict>
            <key>_language</key>
            <string>es</string>
            <key>actionButtonText</key>
            <string>Actualizar dispositivo</string>
            <key>informationButtonText</key>
            <string>Más información</string>
            <key>mainContentHeader</key>
            <string>Su dispositivo se reiniciará durante esta actualización</string>
            <key>mainContentNote</key>
            <string>Notas importantes</string>
            <key>mainContentSubHeader</key>
            <string>Las actualizaciones pueden tardar unos 30 minutos en completarse</string>
            <key>mainContentText</key>
            <string>Se requiere un dispositivo completamente actualizado para garantizar que IT pueda proteger su dispositivo con precisión.

Si no actualiza su dispositivo, es posible que pierda el acceso a algunos elementos necesarios para sus tareas diarias.

Para comenzar la actualización, simplemente haga clic en el botón Actualizar dispositivo y siga los pasos proporcionados.</string>
            <key>mainHeader</key>
            <string>Tu dispositivo requiere una actualización de seguridad</string>
            <key>primaryQuitButtonText</key>
            <string>Más tarde</string>
            <key>secondaryQuitButtonText</key>
            <string>Entiendo</string>
            <key>subHeader</key>
            <string>Un recordatorio amistoso de su equipo de IT local</string>
          </dict>
        </array>
      </dict>
    </array>
    <key>PayloadDescription</key>
    <string>Configures Nudge application</string>
    <key>PayloadDisplayName</key>
    <string>Nudge</string>
    <key>PayloadIdentifier</key>
    <string>com.github.macadmins.Nudge.example.userInterface.updateElements</string>
    <key>PayloadOrganization</key>
    <string>Nudge</string>
    <key>PayloadScope</key>
    <string>System</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>2F54F734-132D-4539-B583-F1DCF23DB5EB</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
  </dict>
</plist>
Clone this wiki locally