Java – MDM – APNs does not work properly

We are implementing MDM solution internally We have registered as an MDM supplier and obtained the final APNs certificate according to the steps of this site We also installed the MDM configuration file in the device, which points to our back-end server, which can receive / send payload to the device

Then we use the Java APNs library to send sample notifications Here is the same sample code

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);

The above execution completed successfully However, the device will not receive any notification Can anyone understand this? Thank you in advance

Update: several problems were found in our implementation The push API obtains the device token and payload We mistakenly use pushmagic as a tag in the push API In addition, the device sends the device token in Base64 format during initial registration Therefore, it needs to be converted to hexa format and used in the push API

Through these two changes, we are one step ahead The feedback service is now returning a message indicating that the corresponding device is inactive We tried to reinstall the configuration file and use the latest push magic and device token The still feedback service returns the same message

Solution

If you still face this problem, follow MDM very carefully_ Protocol. First try to use production APNs

If you have any other questions, please provide details of the questions

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>