1

I need to get the IMEI number and serial number of the SIM card in iOS, i have done this in android using the telephonymanager, but how can i achieve this on iOS?

I need this value because I save it in a data base using a web service, each time a client attemp to log in, so it doesnt matter if the client changes celphone or not, the account will be the same because the SIM card will be the same one.

I have been searching on the web, and found a way with this:

NetworkController.m

But it seems like this class has been removed from the web. Another possible way to achieve my goal is to use:

UIDevice-IOKitExtensions.m

But no documentation is given. Any ideas?

Does apple accepts an app using private framework?

Fernando Santiago
  • 2,128
  • 10
  • 44
  • 75

1 Answers1

4

Apple does not allow the use of private framework / api. Also, getting the users IMEI number will cause Apple to reject the app.

Robert J. Clegg
  • 7,231
  • 9
  • 47
  • 99
  • Is there any other way of getting an unique id of a SIM card in iOS? – Fernando Santiago Apr 14 '14 at 18:54
  • Nope. Apple are trying hard to stop 3rd party developers getting this sort of information. They also stopped the use of UDIDs in iOS6 I believe. – Robert J. Clegg Apr 14 '14 at 18:55
  • I can get in ios7: UIDevice *device = [UIDevice currentDevice]; NSString *uniqueIdentifier = [[device identifierForVendor] UUIDString]; – Fernando Santiago Apr 14 '14 at 18:59
  • 1
    Sure - try submit that to the store and watch it get rejected. – Robert J. Clegg Apr 14 '14 at 19:01
  • There is no point of implementing IMEI if apple store doesnt admit it – Fernando Santiago Apr 14 '14 at 19:43
  • identifierForVendor won't get your app rejected - it is the approved way of obtaining a unique device identifier - however, the identifier is unique for your apps (apps using the same bundle id get the same value) but can change if all of the apps from a vendor are deleted and one is subsequently re-installed and is different to the identifier that another app with a different bundle is will get on the same device. – Paulw11 Apr 14 '14 at 19:45
  • You are welcome. There is another identifier which can be used for advertising, but misuse of that *will* get you rejected - you need to honour the add tracking preference of the user and not use it for non-ad related things – Paulw11 Apr 14 '14 at 19:47
  • So identifierForVendor allows you get get an unique ID - until app is removed / reinstalled, and if installed on same iDevice - will be different to last ID obtained? – Robert J. Clegg Apr 14 '14 at 20:00
  • 1
    Lets put an example, if i have 10 iphones and I download and install the same "x" app on them from the app store, all this 10 iphone will have the same identifierForVendor value??? – Fernando Santiago Apr 14 '14 at 23:09
  • What i need is some unique number or string that identifies the device – Fernando Santiago Apr 14 '14 at 23:10
  • 2
    Each one of the 10 iphones will have an unique identifier, and if they install another app developed by you, they will have the same identifier in both apps – jcesarmobile Apr 15 '14 at 06:31