1

I am working on an enterprise app and need access to programmatically retrieve the device's serial number. Is there an API or any documentation on how to retrieve this in iOS 8? From what I can tell, this functionality has been removed in iOS 8.

Is there a suitable replacement identifier for the serial? I need something that is reliable and will never change even if the device is reset.

It will be for enterprise usage so App Store approval is not a concern.

  • Looking at [this answer](http://stackoverflow.com/a/15224410/860000), there was a way to get the serial number in iOS7 and earlier but it is no longer available in iOS8. Your best bet is probably to store a UUID in the keychain you can track across apps and reinstalls but not resets. – Brian Nickel Jan 30 '15 at 16:47
  • What specifically are you trying to accomplish by knowing the serial number of the device? – Brian Nickel Jan 30 '15 at 17:54
  • The purpose of the app is for tracking repairs performed to iPads and for inventory purposes. I need to have a way of keeping the history of an iPad permanently tied to that iPad. It's crucial that the identifier doesn't change because the company I work for erases all of the iPads on an annual basis. – Jebidiah Linburg Jan 30 '15 at 19:09
  • Added an extra edit that may help. – Dan Mar 08 '15 at 19:18

1 Answers1

0

You're up a creek here. The two "tracking" features are Advertising Identifier and Identifier for Vendor. The former can be reset within the Settings app quite easily while the latter will reset once the user uninstalls all apps with the root bundle identifier associated with the app suite. Both also change with a device reset of course.

If you're deploying the app with an MDM solution you will have access to that device's UDID as it still flows forward to MDM servers, you just can't access it programmatically in your code. The complete deprecation of UDID, serial number and MAC address (even with private APIs) stomped all over some custom utilities I wrote within our Enterprise to try and accomplish something similar to what you're looking to do. If you find somethingthats consistent I'd love to see the follow-up!

EDIT:

I had an epiphany while circling back to this situation again. If you are in fact using AirWatch (I can't speak to Mobile Iron, etc) you can setup the console to send a keychain value to each device at the time of app install. From there the app will be able to consume the value AirWatch sends down. The same goes for any attribute that AirWatch harvests for the device (serial, UDID, MAC, etc). While this workaround comes with a big caveat (using AirWatch for deployment) it will work. Since Apple neutered all Serial Number work arounds win iOS8 this is the most viable option I have found.

Dan
  • 5,153
  • 4
  • 31
  • 42
  • Dan, I was coming back to this issue again after having the same MDM idea. I was hoping to avoid needing to tap into the MDM's data due to not having full access to write scripts. I came up with an alternative workaround that's admittedly a bit bizarre. Apple's GSX service (for self-servicing accounts) has an API for retrieving diagnostic information. I can request that the user manually input the serial number, then upload it into GSX diagnostics. I load the diagnostic page in the background and if it comes back without error, I know the serial is valid and can save in keychain. – Jebidiah Linburg Apr 20 '15 at 14:18
  • That very well may work. Given the scope of my environment (user base and user technology level) I'm forced to remove human error as much as possible. Great potential workaround, though. – Dan Apr 20 '15 at 14:20