iOS 企业开发者账号:获取设备令牌 [英] iOS Enterprise developer Account: get device token

查看:32
本文介绍了iOS 企业开发者账号:获取设备令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用 iOS 开发帐户创建 APNS SSL 证书,以便将推送通知发送到 iOS 设备以进行开发.我可以在 iOS 设备中使用目标 c 示例代码获取设备令牌.然后我可以使用该设备令牌为该特定 iOS 设备发送推送通知.

I have used the iOS development account for creating APNS SSL certificate for sending the push notification to an iOS device for development purpose. I can get the device token using objective c sample code in iOS device.Then I can use that device token to send push notification for that specific iOS device.

现在我要实施 MDM,对于 MDM,需要 iOS 企业帐户.有一些问题,我想确认一下是否有人已经完成了.

Now I am going to implement MDM and for MDM iOS Enterprise account is required. There are some questions, which I want to confirm if someone has already done.

  1. 所以我想知道我可以使用 iOS 企业帐户来创建用于开发目的的apns ssl 证书"吗?

  1. So I want to know can I use iOS Enterprise account for creating "apns ssl certificate" for development purpose?

我能否使用相同的目标 C 示例代码获取 iOS 设备的设备令牌,以便我可以通过 APNS 将推送通知发送到该特定 iOS 设备以进行测试?

Can I get device token for an iOS device using the same objective C sample code, so that I can send the push notification via APNS to that specific iOS device for testing purpose?

推荐答案

首先,MDM 推送通知的实现与第三方 iOS 应用的推送通知不同.

First of all MDM push notification implementation is different than push notification for third party iOS application.

1)您必须使用 iOS 企业帐户进行 MDM 推送通知,并且获得 APNS 证书的步骤很少.1.参考 MDM_Protocol 并点击此链接:http://www.softhinker.com/in-the-news/iosmdmvendorcsrsigning 然后验证一些事情.

1)You have to use iOS Enterprise account for MDM push notification and there are few steps to get APNS certificate. 1.Refer MDM_Protocol and follow this link: http://www.softhinker.com/in-the-news/iosmdmvendorcsrsigning Then verify few things.

使用此命令从 customerPrivateKey.pem 中删除密码

remove the passphrase from customerPrivateKey.pem using this command

openssl rsa -in customerPrivateKey.pem -out PlainKey.pem

然后合并从门户 https://identity 下载的 APNS 证书(例如 CustomerCompanyName.pem).apple.com/pushcert/ 使用这个命令

Then merge your APNS certificate (for example CustomerCompanyName.pem) downloaded from the portal https://identity.apple.com/pushcert/ using this command

cat CustomerCompanyName.pem PlainKey.pem > PlainCert.pem

现在这个 PlainCert.pem 文件可以在您的服务器中用作 APNS/MDM 证书.

Now this PlainCert.pem file can be used in your server as APNS/MDM certificate.

2)在 MDM 推送通知中有三个键

2)In MDM push notification there are three keys

• PushMagic - MDM 服务器随每个推送请求发送的唯一令牌

• PushMagic - a unique token the MDM server sends with each push request

• 令牌 - 向 APNS 服务标识设备的唯一令牌

• Token - a unique token that identifies the device to the APNS service

• UnlockToken - 用于清除设备密码的托管密钥.

• UnlockToken - an escrow key used to clear the passcode on the device.

MDM 推送通知负载也不同于推送通知负载.它应该如下所示:

MDM push notification payload is also different than push notification payload.It should look like this:

{"aps":{},"mdm":PushMagic}

{"aps":{},"mdm":PushMagic}

这篇关于iOS 企业开发者账号:获取设备令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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