Search code examples
iospush-notificationmdm

How does the push notification works in the Mobile Device Management in iOS?


I am doing MDM implementation in iOS and I have one server for its implementation.I have gone through the documents and understood the process that we have to undergo.But Simply I don’t understand how it will happen.I have one server and one device.I have my PEM file enrolled in the server.

As the process of MDM says server sends push notification through the device and the information that is present in the message in only the identifying token.Then device is connected to the server and sends an idle message confirming that device is ready for the commands.

My question is how device receives the push notification.If app is in back ground state and it gets a notification to connect to the server is there any method to detect it and send the feedback or is it happening automatically or we have to write some code for it. Also how does the plist (that we get in command) make changes in the settings (unlock to lock) .Do we save it somewhere in the device configuration? I have got a lot of questions about the command format but did not get anything how the command works.May be I am missing basic iOS coding.please just explain me the above format.


Solution

  • how device receives the push notification.If app is in back ground state and it gets a notification to connect to the server

    First of all, you will have to implement server side only for iOS MDM. Client side is implemented by Apple and MDM client is baked into iOS.

    As part of OS it dosn't have restriction which usual iOS apps has. It has a persistent channel to APNS and as soon as somebody send a push notification to APNS, the device will receive it through this persistent channel and will start doing what it should be doing.

    Also how does the plist (that we get in command) make changes in the settings (unlock to lock) >.Do we save it somewhere in the device configuration?

    The answer is the same. You don't have to implement anything on the iOS side. It's all done by Apple- MDM client will get the command, parse it, save it to appropriate places and enforce appropriate policies.