Getting iPhone unique number

2.7k views Asked by At

I need to get iPhone unique number programmatically. I know that apple will reject app if I try to gain iPhone serial number.

But may be there is a way to get any unique number of iPhone, so server can distinguish  one device from another.

3

There are 3 answers

4
Raptor On BEST ANSWER

For each iPhone, MAC address is unique ( except for iOS Simulator ). You can obtain the information to identify the device. This question will guide you to get MAC address. However, iOS7 disallows use of MAC address. Therefore, for iOS 6 or before, you can use MAC address; for the coming iOS 7, you can use the following method.

Since iOS 6, Apple suggests to use Advertising Identifier, which can be found in ASIdentifierManager class. Example code:

NSUUID *uuid = [ASIdentifierManager advertisingIdentifier];
3
James On

Have you looked at identifierForVendor?

https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor

Apple describe it as:

An alphanumeric string that uniquely identifies a device to the app’s vendor.

0
AJC On

You should try this to get uid of your iPhone:

 NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];