Search code examples
push-notificationuuidapple-push-notificationsmdm

mapping iphone uuid to phone number


I am developing an mdm server to interact with apple push notification service. When I install a configuration profile on an iPhone, the device pushes the UUID and push magic string to the server. My goal is to install configuration porofiles on large number of iPhones. On the server side I don't know the UDID phone number mapping, All I have is phone number. How to I map the UUID to the phone number.

When I send a push notification I have to use UUID, to send correct push command on qualified devices, I need the UUID vs phone number mapping


Solution

  • After a device registers with your MDM system you will know that device's UDID (unique device identifier). You can then send a DeviceInformation command to the device and get the phone number (if, in fact, the device has a phone number). You will save that phone number in the database in a record associated with the UDID you got when the device initially enrolled in your MDM.

    From this point on, whenever you send a command to the device that command will have a UUID. Make sure your system remembers the UDID of the device that you are sending this command to. When the device responds that response will contain this UUID and using this UDID you can then look up the UDID (and hence the phone number) of the device that responded.

    Note: If you are trying to use the phone number as a unique identifier for an enrolled device, don't. Use the UDID instead.