PDA

View Full Version : Imei




anmldr
Jul 15, 2008, 02:13 PM
I need to develop a secure (as possible) app that can only be accessed by certain iPhones. Is there a way to get a specific number such as IMEI, serial number or phone number directly from the phone? I would then perform a calculation on this number and the user would ask for a registration number for the app and I would send one based on the information that they send to me.

I have done something similar for years on the Palm and Windows Mobile devices and now need something for the iPhone.

Linda



psyqd
Jul 15, 2008, 02:21 PM
Well, there are ways to access the SN, IMEI and phone numbers from the iPhone, but why would you want to?

Using Apple's App Store, people could buy it and it would automatically register. Or, if you want to limit access, you can send it through email to up to 100 people.

DaveGee
Jul 15, 2008, 05:00 PM
Well, there are ways to access the SN, IMEI and phone numbers from the iPhone, but why would you want to?

Using Apple's App Store, people could buy it and it would automatically register. Or, if you want to limit access, you can send it through email to up to 100 people.

Send it to (up to) 100 people isn't as simple as it sounds.... you need to obtain the 'unique id' of the device and then build a provisioning document (think thats what its called) that includes those 100 'unique ids' and then you build the application (using that provisioning document) and then you can send it to the 100 people **along with** that provisioning document then you will use iTunes to install the app... even if someone else does get the app it will not install since the devices UID must be present in that provisioning document before iTunes will install it.

(I think I got that right)

Here is the kicker... the only way to obtain the UID (as far as I can tell) is to open up Xcode and then go to the 'Window' menu and (with the iPhone/iPod connected) choose the menu option called "Organizer" its in that window that you will be shown the 'identifier' (uid) of the device. Its a really long string of characters perhaps base64 encoded... I'm not sure....

So unless Apple changes things (or already has), getting the UID from 'other people' isn't going to be so simple... Unless they have the latest Xcode already on their machine.... (aka someone who is a developer and is signed up in ADC)

My gut tells me that Apple will (or already has) provide a way to obtain the identifier without having to use Xcode... Anyone know for sure?

Dave

psyqd
Jul 15, 2008, 05:09 PM
Send it to (up to) 100 people isn't as simple as it sounds.... you need to obtain the 'unique id' of the device and then build a provisioning document (think thats what its called) that includes those 100 'unique ids' and then you build the application (using that provisioning document) and then you can send it to the 100 people **along with** that provisioning document then you will use iTunes to install the app... even if someone else does get the app it will not install since the devices UID must be present in that provisioning document before iTunes will install it.

(I think I got that right)

Haha, well that's pretty secure I suppose. :p

wanion
Jul 15, 2008, 06:48 PM
Here is the kicker... the only way to obtain the UID (as far as I can tell) is to open up Xcode and then go to the 'Window' menu and (with the iPhone/iPod connected) choose the menu option called "Organizer" its in that window that you will be shown the 'identifier' (uid) of the device. Its a really long string of characters perhaps base64 encoded... I'm not sure....

You can get the UDID from iTunes. When you view the 'Summary' tab for the device, click on the serial number label (not the serial number itself) and it'll change to 'Identifier'. Then you can just copy it with cmd-C. The text can't be selected, but it appears it just copies the identifier if it's being displayed.

anmldr
Jul 16, 2008, 12:12 AM
>Well, there are ways to access the SN, IMEI and phone numbers from the iPhone, but why would you want to?

Primarily because this is not information for the masses.

I wish that I were a game developer that could develop THE killer app for the iPhone. What I am developing though is not on this order. It is data that needs to be secure.

Thanks for letting me know about what can be found in iTunes. I did already know that but if it is in iTunes then what that means is that the iPhone itself is broadcasting that information. I want it to be displayed (or captured rather) in my app so that I can generate a registration number for that particular iPhone for that particular app.

Linda

wanion
Jul 16, 2008, 12:45 AM
You can get the same identifier on the device with:
[[UIDevice currentDevice] uniqueIdentifier]

anmldr
Jul 16, 2008, 08:08 AM
Thank you. I will give that a try.

DaveGee
Jul 16, 2008, 10:42 AM
You can get the UDID from iTunes. When you view the 'Summary' tab for the device, click on the serial number label (not the serial number itself) and it'll change to 'Identifier'. Then you can just copy it with cmd-C. The text can't be selected, but it appears it just copies the identifier if it's being displayed.

Wow thats cool... good to know... good to know... it'll make life much easier that way... I didn't think mandating all testers have Xcode installed made alot of sense... :lol:

Thanks for the info! I'm sure it was documented somewhere but the developer docs are still in such a haphazard condition I might not have even found it.

Dave