-2

How do i get IPhone IMEI?

UIDevice *myDevice = [UIDevice currentDevice];
NSString *identifier = myDevice.uniqueIdentifier;

This is the code i tried but isn't working.

ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86
  • I've removed the Visual Studio tag because this question is about code, and not about using the Visual Studio application. – ProgrammingLlama Jun 08 '21 at 12:31
  • 1
    That code appears to be Objective-C (or perhaps Swift? I'm not very familiar), not C#. Can you provide some more information about what you're doing? Are you using Xamarin? – ProgrammingLlama Jun 08 '21 at 12:32

1 Answers1

1

Since iOS 7 Apple does not allow you to identify a device using IMEI any more.

You may have to use UDID instead.

PythonicNinja
  • 499
  • 4
  • 10