Mrz 23 2011

Read some interesting data from your iDevice with iOS 4.3

Published by at 9:06 PM under iPhone



Ever tried to read some interesting data like the Serial Number, IMEI, Phone Number… from your iPhone (or an other iDevice) ? Some data is easy to access, some other uses not supported API calls. I have written a simple App which can read the above mentioned data. You can download it here (click)

The App looks like this:

ReadIDevice-App

ReadIDevice-App



Reading common data is very easy, this is the Code for the UniqueIdentifier, iDevice Name, System Name, System Version and Model:

// Stores the complete Text Output
NSMutableString *data = [[NSMutableString alloc] init];

// Reading Legal Apple Data
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"phoneUniqueIdentifier", [[UIDevice currentDevice] uniqueIdentifier]]];
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"name", [[UIDevice currentDevice] name]]];
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"systemName", [[UIDevice currentDevice] systemName]]];
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"systemVersion", [[UIDevice currentDevice] systemVersion]]];
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"model", [[UIDevice currentDevice] model]]];
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"localizedModel", [[UIDevice currentDevice] localizedModel]]];

To access the IMEI and Serial Number you have to use the (semi)public IOKit framework. Erica Sadun has managed this and released the overwritten IOKit-Extension. I have included these files in my App and used it this way:

#import "UIDevice-IOKitExtensions.h"

// Reading not by the Appstore supported Data
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"IMEI", [[UIDevice currentDevice] imei]]];
[data appendString:[NSString stringWithFormat: @"%@: %@nn", @"SerialNr", [[UIDevice currentDevice] serialnumber]]];


Be aware that you cannot submit an App with this IOKit-Extension into the Appstore!

Sadly, i found no solution for reading the Phone Number. In previous versions it was possible, but nevermore in iOS 4.3 . If someone has a solution, please drop a line in the comments.

Technorati Tags: , , , , , , ,

One response so far

One Response to “Read some interesting data from your iDevice with iOS 4.3”

  1. Ron sagt:

    Thank you for your great post.
    Do you know if this works on iOS 6?
    It seems that the imei number is missing.
    Do you know another way to get the IMEI number?
    Thank you
    Ron