Retrieving the serial number from the device

Abhinav picture Abhinav · Aug 19, 2011 · Viewed 9.1k times · Source

How do we get the serial number of the device through objective C? I want to retrieve the iPod/iPhone/iPad serial number from within my application.

Answer

Joe picture Joe · Aug 19, 2011

If you are creating an application that will not be submitted to the App Store you can check out Erica Sadun's UIDevice Extensions which uses IOKit.framework.

[[UIDevice currentDevice] serialnumber]