不能够在MDM净荷和命令发送到设备 [英] Not able to send the mdm Payload and Command to device

查看:327
本文介绍了不能够在MDM净荷和命令发送到设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我MDM开发针对iOS的测试目的。我已经安装在设备上的个人资料,我已经拿到了设备令牌,PushMagic现在我要发送的MDM有效载荷 {MDM:PushMagicValue}

I am developing mdm for iOS for testing purpose. I have installed the profile on the device and I have got the Device Token, PushMagic and now I want to send the mdm payload {"mdm":"PushMagicValue"}

和这个我使用code

and for this I am using the code

from APNSWrapper import *

wrapper = APNSNotificationWrapper('PushCert.pem', False)
message = APNSNotification()
message.token('CgeMZKRl2cqZAmGQ0VNCvySXAsaMPqeHga9ZUC3kqpM=')
message.appendProperty(APNSProperty('mdm', 'D60DAB80-A41D-4689-9F14-004E29431742'))
wrapper.append(message)
wrapper.notify()
print 'Done'

问题是,我的测试服务器发送该消息没有任何错误,但我没能看到我的设备登录任何回应。请告诉我,我错了,如何使它工作任何帮助将AP preciated ...

The problem is that my test server sends this message without any errors but I am not able to see any response on my device logs. Please tell me where I am wrong and how to make it work Any help will be appreciated...

推荐答案

苹果公司现在向设备发送一个令牌用base64 EN codeD格式,为此我们不得不使用的base64功能与设备令牌
而不是 message.token的('CgeMZKRl2cqZAmGQ0VNCvySXAsaMPqeHga9ZUC3kqpM =')

Apple now sends the Device Token in base64 encoded format for this we have to use the base64 function with the device token instead of message.token('CgeMZKRl2cqZAmGQ0VNCvySXAsaMPqeHga9ZUC3kqpM=')

我用

message.tokenBase64("6CORK2VBuJCPi1Y8oB3PRyoIiSf7Aq5sD7noZ/Awxao=")

和这样做有问题....

and this did the trick ....

这篇关于不能够在MDM净荷和命令发送到设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆