Skip to content

Instantly share code, notes, and snippets.

@mhaseebkhan
Last active January 11, 2017 05:48
Show Gist options
  • Save mhaseebkhan/58ebecf262025023c7c6 to your computer and use it in GitHub Desktop.
Save mhaseebkhan/58ebecf262025023c7c6 to your computer and use it in GitHub Desktop.
Get UDID with AirWatch MDM
// UDID is no longer available in iOS 6+ due to security / privacy reasons. It can't be retreived the old way
// even when AirWatch MDM is used, because, the APIs are not available.
// However, in order to find more info from AirWatch for the enrolled device and the associated user, we need
// to have UDID, Serial Number or Mac Address which can't be accessed directly either.
// During the installation process, AirWatch pushes a profile and certificate to the user's device which
// contains the UDID.
// This operates on the assumption that AirWatch is configured to push the UDID to the device during the
// configuration/enrollment process.
[[[NSUserDefaults standardUserDefaults]
dictionaryForKey:@"com.apple.configuration.managed"][@"com.AirWatch.mdm.DeviceUid"]
lowercaseString]
@E2-Mohamed
Copy link

E2-Mohamed commented Jan 11, 2017

Is this solution still works?
if so give me more details about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment