Dunfey · Hotel WWDC as data, est. 1983
Front desk everything
Years
Topics

2022 Business & Education

WWDC22 · 32 min · Business & Education

Adopt declarative device management

Discover how you can simplify development of your device management solution with the declarative approach. We’ll take you through the latest updates to platform support and explore protocol enhancements for status and predicates.

Watch at developer.apple.com ↗

Transcript all transcripts

Code shown on screen · 9 snippets

Passcode status items json · at 7:41 ↗
{
  "management": {
    "client-capabilities": {
     "supported-payloads": {
       "status-items": [
          ...
          "passcode.is-compliant",
          "passcode.is-present",
          ...
        ]
      }
    }
  }
}
Account status items json · at 10:52 ↗
{
  ...
      "status-items": [
          ...
          "account.list.caldav",
          "account.list.carddav",
          "account.list.exchange",
          "account.list.google",
          "account.list.ldap",
          "account.list.mail.incoming",
          "account.list.mail.outgoing",
          "account.list.subscribed-calendar",
          ...
        ]
  ...
}
Mail and subscribed calendar status item objects json · at 11:19 ↗
{
  "identifier": "592D763E-C15B-44F8-A1FC-F88EB1901646",
  "declaration-identifier": "BF8FD199-467B-4BA5-886D-D82B7849E517",
  "hostname": "mail.example.com",
  "port": 443,
  "username": "user01",
  "is-mail-enabled": true,
  "are-notes-enabled": false
}

{
  "identifier": "592D763E-C15B-44F8-A1FC-F88EB1901646",
  "declaration-identifier": "BF8FD199-467B-4BA5-886D-D82B7849E517",
  "calendar-url": "https://holidays.example.com/country/US.ics",
  "username": "user01",
  "is-enabled": true
}
MDM app status item json · at 17:13 ↗
{
  "management": {
    "client-capabilities": {
     "supported-payloads": {
       "status-items": [
          ...
          "mdm.app",
          ...
        ]
      }
    }
  }
}
Status report with MDM app status item json · at 17:35 ↗
{
  "StatusItems": {
    "mdm": {
      "app": [
        {
          "identifier": "com.apple.Pages",
          "name": "Pages",
          "version": "7358.0.134",
          "short-version":12.0",
          "external-version-id": "844362702",
          "state": "managed"
        }
      ]
    }
  },
  "Errors": []
}
Predicate subquery using the MDM app status item markdown · at 22:15 ↗
SUBQUERY(@status(mdm.app),
         $app,
         ($app.@key(identifier) == "com.example.app") AND ($app.@key(state) == "managed")
        ).@count == 1
Management properties declaration json · at 24:10 ↗
{
  "management": {
    "client-capabilities": {
     "supported-payloads": {
       "declarations": {
         ...
         "management": [
          ...
          "com.apple.management.properties",
          ...
         ]
         ...
        }
      }
    }
  }
}
Management properties declaration object json · at 24:40 ↗
{
  "Type": "com.apple.management.properties",
  "Identifier": "AAE09D73-6EF6-4F3B-9E15-11B0F86D5591",
  "ServerToken": "AB4C5B91-3E08-4D4E-A9FF-1E44FE5BFDD4",
  "Payload": {
    "name": "Student One",
    "age": 7,
    "roles": ["grade1", "spanish"]
  }
}
Activation with management properties predicate json · at 24:53 ↗
{
  "Type": "com.apple.activation.simple",
  "Identifier": "076F928B-9D8E-4BA2-AD34-5655805C82D7",
  "ServerToken": "4FFA91BF-85AE-4053-B8FE-B1C3E507A9CB",
  "Payload": {
    "StandardConfigurations": [
      "3BBB4407-238A-44B1-ABB1-5E7AB95160E0"
    ]
  },
  "Predicate": "(@property(age) >= 18) AND ("Grade12" IN @property(roles))"
}

Resources