MDM - APNS not working

Go To StackoverFlow.com

7

We are implementing MDM solution in house. We have registered as MDM vendor and followed the steps from this site and got the final APNS certificate. We also installed a MDM profile in the device which points to our back end server which is capable of receiving/sending payloads to the device.

Then we used java-apns library to send a sample notification. Below is the sample code for the same.

    ApnsService service =
            APNS.newService()
            .withCert("test.p12", "xxxxxxx")
            .withProductionDestination()
            .build();
    String pushMagic = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx";

    String mdmPayload = APNS.newPayload().mdm(pushMagic).build();
    service.push(pushMagic, mdmPayload);

Above execution goes through successfully. But device doesn't receive any notifications. Can someone throw some light on this? Thanks in advance.

Update: Found couple of issues in our implementation. push API takes device token and payload. We were incorrectly using pushmagic as token in push API. Also devices send the device token in base64 format during initial check-in. So it needs to be converted to hexa format and used in push API.

With these two changes, we are one step ahead. Now feedback service is returning a message saying that the corresponding device is inactive. We tried reinstalling the profile and used the latest push magic and device token. Still Feedback service is returning the same message.

2012-04-04 22:51
by Venky
I've created TestMDM (http://www.testmdmapp.com) if you're looking to test Enterprise apps without the distraction of your own full, MDM - Tomas McGuinness 2014-01-27 17:52
@Venky I have the same problem. I can send wakeup msg, but can’t send command using the same java-apns library. did you manage to send a devicelock command to the device successfully - mor222 2018-07-27 11:04


0

If you are still facing the issue, follow MDM_Protocol very carefully. Try to use production APNS first.

If there is any other issue provide the issue details.

2012-05-10 04:06
by User97693321
a code example for devicelock would be great. I can get "idle" msg but can't send commands - mor222 2018-07-27 11:07
Ads