iOS device unique identity acquisition policy

Source: Internet
Author: User


English Original: In iOS 7 and later, if you ask for the MAC address of an IOS device, the system returns the value 02:00:00:00:00: Need to identify the device with the Identifierforvendor property of Uidevice instead. (Apps that need a identifier for their own advertising purposes should consider using the Advertisingidentifier property of Asidentifiermanager instead.)

Translation: From IOS7 and later, if you request a MAC address from your iOS device, the system will return a fixed value of "02:00:00:00:00:00" if you need to identify the uniqueness of the device, Please use the Uidevice Identifierforvendor property. (If you need to identify your device for advertising purposes, consider using Asidentifiermanager's Advertisingidentifier property as an alternative)

What does this MAC address mean? What's the use?
MAC (Medium/media Access Control) address, which represents the identifier of each site on the internet, in hexadecimal notation, a total of six bytes (48 bits). Of these, the first three bytes are the code (high 24 bits) assigned by the registration Authority RA of the IEEE to different manufacturers, also known as the "unique identifier" (organizationally unique Identifier), and the last three bytes (low 24-bit) Adapter interfaces that are assigned to production by each manufacturer are called extension identifiers (uniqueness).

MAC address is used on the network to differentiate the uniqueness of the device, access to network devices have a MAC address, they must be different, is unique. There may be multiple MAC addresses on an iphone, including WiFi, SIM, and so on, but itouch and ipad have a WiFi connection, so just get the WiFi MAC address, which is En0 's address.

The image says that the MAC address is just like the ID number on our ID card and has global uniqueness. This can be very good to identify the device uniqueness, similar to the udid number of Apple devices, the usual use is: 1 for some statistical and analytical purposes, using the user's operating habits and data to better plan products; 2) as a user ID to uniquely identify the user, You can use the app as a visitor and save the appropriate information on the server side, eliminating the registration process such as user name, password, etc.

So, how do you use a MAC address to generate a device's unique identity? The main points are three kinds:
1. Direct use of "MAC Address"
2, use "MD5 (MAC Address)"
3, use "MD5 (Mac address+bundle_id)" To obtain "Machine + app" Unique identification (BUNDLE_ID is the unique identity of the app)

before IOS7, because the MAC address is unique, the General app developer takes a 3rd way to identify the device that installs the corresponding app. Why would you use it? Before IOS5, both were used Udid and were later disabled. The use of UUID is recommended by Apple, but there are many problems with MAC addresses. and MAC address like Udid, there is a privacy issue, now Apple new release iOS7, if the request MAC address will return a fixed value, then Mac address+bundle_id This value everyone's device has become consistent, as the same as Udid is disabled. So, how to identify the device is unique?

There are many ways to get the unique identity of a device on an iOS system:
I. UDID (Unique Device Identifier)

two. UUID (universally Unique Identifier)

three. MAC Address

four. OPEN UDID

five. Advertising identifiers (Idfa-identifierforidentifier)

six. Vindor identifiers (Idfv-identifierforvendor)

seven. Push token+bundle_id

Udid's full name is unique device Identifier, which is the unique identifier of the Apple iOS device, which consists of 40 characters of letters and numbers (jailbroken devices can change the device's Udid by some tools). Mobile networks can use UDID to identify mobile devices, but since IOS5.0 (August 2011), Apple has announced that it will no longer support the use of the uniqueidentifier method to obtain the udid,ios5 of the device below. On March 21, 2013 Apple has informed developers that, from May 1, 2013 onwards, the program to access Uidids will no longer be approved, and the alternative is that developers should use the "vendor or advertising identifiers described in iOS 6". So Udid is absolutely useless.

OPEN UDID, does not use the MAC address, but also can ensure that different applications on the same device use the same openudid, as long as the user device has a use of openudid application exists, other subsequent installation of the application if the acquisition Openudid, Will get the one that was generated by the first app. However, according to the code and methods of the contributors, and some developers experience, if the use of the Openudid scheme of applications are all deleted, and then regain Openudid, at this time the Openudid is not the same as before. Visible, this method is still not insurance.

The ad identifier, another new method in iOS 6, provides a method for Advertisingidentifier, which returns a Nsuuid instance by calling the method, and finally obtains a UUID that is stored by the system. However, even though this is stored by the system, there are several cases where the ad identifier is regenerated. This ad identifier is regenerated if the user completely resets the system (restore location and privacy, general-purpose, Setup, and so on). In addition, if the user explicitly restores the ads (set-up, general-purpose, and so on, to the ads, and restore the ad identifiers), then the ad identifiers will be regenerated. With respect to the restoration of the ad identifier, it is important to note that if the program is running in the background, the user "restores the ad identifier" and then goes back to the program, and then gets the ad identifier and does not immediately get the restored identifier. You must terminate the program before restarting the program to obtain the restored AD identifier.

The Vindor identifier, also added in iOS 6, is the same as Advertisingidentifier, which returns a Nsuuid object that can get a UUID. If the condition "same program inside-same vindor-same device" is met, then the property value obtained will not change. This value will not be the same if it is "the same program-the same device-different vindor, or the same program-different devices-whether or not the same Vindor" is the case.

ways to push token+bundle_id:
1, the application to increase the push to obtain tokens
2. Get Application bundle_id
3. Hash operation according to TOKEN+BUNDLE_ID

Apple Push token guarantees that the device is unique, but must have a network condition to work, which is not dependent on the device itself, but relies on Apple push, and apple push sometimes gets out of the way.

UUID is universally unique identifier abbreviation, Chinese meaning is universal unique identification code. It is to allow all the elements in the distributed system to have unique identification information, and do not need to through the central control side to do the identification information designation. In this way, everyone can create a UUID that does not clash with others. In this case, there is no need to consider the name duplication problem when the database is established. Apple recommends using a UUID to generate a unique identification string for your app.

original link: http://www.2cto.com/kf/201308/237648.html

iOS device unique identity acquisition policy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.