IOS Enterprise Developer Account: Get Device Token

I used an iOS development account to create an ssl apns certificate to send push notifications to an iOS device for development purposes. I can get the device token using the object code from the example in the iOS device. Then I can use this device token to send a push notification for that particular iOS device.

Now I'm going to implement MDM, and MDM requires an iOS Enterprise account. There are some questions that I want to confirm if someone has already done so.

1.So I want to know if I can use the iOS Enterprise account to create an "apns ssl certificate" for development purposes?

2.Can I get a device token for an iOS device using the same example C object code so that I can send a push notification via APNS to this particular iOS device for testing purposes.

Please help me.

+4
source share
3 answers

First of all, the MDM push notification implementation is different from the push notification for a third-party iOS application.

1) You must use your iOS Enterprise account to notify MDM push, and there are several steps to get an APNS certificate. 1.Refer MDM_Protocol and follow this link: http://www.softhinker.com/in-the-news/iosmdmvendorcsrsigning Then check a few things.

remove the passphrase from customerPrivateKey.pem using this command

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

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

 cat CustomerCompanyName.pem PlainKey.pem > PlainCert.pem 

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

2) There are three keys in the MDM push notification

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

• Token - a unique token that identifies a device for APNS

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

The MDM push notification payload also differs from the push message payload. It should look like this:

{"APS": {}, "MDM": PushMagic}

+2
source

Take a look at http://urbanairship.com/ its excellent service for handling push notifications, and you can easily send test push notifications to any registered device,

Also this tutorial: http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk_apns/ was an amazing resource for me when setting up push notifications with my application.

For your first question, yes, you can. On the iOS developer site, go to the initialization portal> application identifier and enable the application for push notifications (dev or production).

+1
source

1) see this answer

2) not for the push MDM token - this is sent to the MDM server during the registration procedure.

0
source

Source: https://habr.com/ru/post/1403803/


All Articles