Skip to content

Instantly share code, notes, and snippets.

@nicwise
Last active December 18, 2015 11:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nicwise/5772980 to your computer and use it in GitHub Desktop.
Save nicwise/5772980 to your computer and use it in GitHub Desktop.
Getting the UDID even tho Xamarin removed it
var foo = UIDevice.CurrentDevice.UniqueIdentifier;
var bar = UDID ();
Console.WriteLine (foo + "////" + bar);
return true;
}
public string UDID()
{
var device = UIDevice.CurrentDevice;
//if (this.IsDirectBinding)
//{
return NSString.FromHandle (Messaging.IntPtr_objc_msgSend (device.Handle, Selector.GetHandle ("uniqueIdentifier")));
//}
//return NSString.FromHandle (Messaging.IntPtr_objc_msgSendSuper (base.SuperHandle, Selector.GetHandle ("uniqueIdentifier")));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment