1

I want to collect device attributes and send them to the mdm server using push notification.

Steps involved are:

  1. create a configuration profile with mdm payload
  2. get device token
  3. use apple push notification service to send a notification to the device.
  4. get back device attributes
  5. do same with multiple devices which the company manages

Questions:

  1. Will the user always need to act on a message or I can send a message onto the device without user action and get the work done?
  2. Do I need an app on the device to send back the token?
Tyler Hyndman
  • 1,402
  • 3
  • 17
  • 24
Ashutosh
  • 132
  • 2
  • 11

2 Answers2

1

It sounds like you're trying to use push notifications to poll iOS devices and return information.

Push notifications do not provide a mechanism to execute code on a device without user interaction. You would have to have an application loaded on the device, and the user would have to click through from the notification to your app.

In iOS, applications generally don't run unless the user is actively interacting with them. There are a few exceptions (e.g. background audio.)

You do need to have an app running to get the device token. You call registerForRemoteNotificationTypes. See APNs docs for more information.

Edited to add more information:

Looks like the MDM protocol uses push notifications to do just what you describe. However, there's nothing about it in Apple's "Local and Push Notification Programming Guide" (linked above).

Apparently Apple keeps tight control over the MDM documentation (see here and here).

However, I did find this paper from blackhat describing how the system works.

My earlier point about not executing arbitrary code on a device without user interaction still applies. There's a finite set of commands that can be executed (see Appendix A).

funroll
  • 35,925
  • 7
  • 54
  • 59
  • our objective is to run the DeviceInformation command on the devices once each day. With the app on the device we will get the device token and we can send commands. Now the problem is that the users will be notified every day. We don't want to do that and I was looking to find a way out. Looks like there is no solution for this yet. – Ashutosh Jan 03 '12 at 21:58
  • Based on the additional information I added, it sounds like you would be able to query the device daily, without having an app installed on it. However, there is some other setup detailed in the paper that you'd have to do. See the section titled "MDM Enrollment Profile". – funroll Jan 04 '12 at 18:02
  • Thanks for the helps. The paper you referred was helpful. Now the device pushes the UUID to the MDM server. – Ashutosh Jan 06 '12 at 18:44
  • Is there a way to know what is the phone number for the incoming UUID. Since I will install the configuration profiles on many phones, I will have to ,ap the phone numbers to the UUID. Until the server gets the UUID from the device, it is not aware of the UUID. All it knows is phone numbers. I need a way to know the phone number for a given UUID so that I can map them and use it for push notifications – Ashutosh Jan 06 '12 at 18:46
0

I came across this question when searching for iOS push notification access payload without user interaction - Just want to add that, in iOS 7 and above, it is possible to send silent push notifications to app, and app can process them without user interaction.

However, I've also found some discussions saying that the silent push notifications are not delivered reliably, in this SO post. That's why I'm still looking for alternate ways to retrieve payloads of the normal remote push notifications. Doesn't look like there's a way.

Community
  • 1
  • 1
Daniel
  • 1,101
  • 9
  • 18