Skip to content

Add MDM notifications - #268

Merged
kylebrowning merged 2 commits into
mainfrom
feat/mdm-notification
Oct 16, 2026
Merged

kylebrowning merged 2 commits into
mainfrom
feat/mdm-notification

Conversation

@kylebrowning

Copy link
Copy Markdown
Owner

APNSPushType.mdm had no notification model or send method. This was deferred from the July parity audit because the payload is documented in the device management protocol rather than the push notification docs.

What changed

  • APNSMDMNotification encodes {"mdm": "<PushMagic>"} with no aps key, exactly as Apple's Sending MDM commands to a device specifies. The topic is the UID from the subject of the MDM push certificate, so there is only a topic: init and no appID: convenience.
  • sendMDMNotification(_:deviceToken:) on APNSClientProtocol.

The test server already accepted mdm with no topic suffix requirement, so no server changes.

Tests

Encoding test and an integration test through the test server.

162 tests, 0 failures.

Models the {"mdm": PushMagic} payload from Apple's device management
protocol with a sendMDMNotification method. The topic is the UID from the
MDM push certificate's subject, so there is no appID convenience.
# Conflicts:
#	Tests/APNSTests/APNSClientIntegrationTests.swift
@kylebrowning
kylebrowning merged commit 966909e into main Oct 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant