Summary of unique identities for iOS

Source: Internet
Author: User

Apple has officially announced that after May 2013, apps using UUID will not be audited, and Apple has added ad identifiers (IDFA) and IDFV.

1. What are the methods for obtaining UUID?

// Cfuuid Cfuuidref cfuuid =*cfuuidstr = cfbridgingrelease (cfuuidcreatestring (Kcfallocatordefault,cfuuid)); /*nsuuidstr = [[Nsuuid uuid]uuidstring];

After testing on the IOS10, it is found that each production UUID is different, so it does not have the ability to act as a unique identifier.

2. Get IDFA (ad identifier)

#import <AdSupport/AdSupport.h>//BOOL istrackenabled = [[Asidentifiermanager Sharedmanager]isadvertisingtrackingenaled]; // get IDFA (ad identifier) NSString * idsastr =  [[[Asidentifiermanager sharedmanager]advertisingidentfier]uuidstring];

Pros: Ad identifiers, all apps in the device get the same, even if the app is removed and re-downloaded is still consistent.

Disadvantage: 1, if restore factory settings, empty the advertising identifier, IDFA will change;

2, limit the switch of advertising, just a bool value, and will not affect us back to IDFA, but each change switch, will lead to IDFV change;

Therefore, the advertising identifier, in contrast, can be used as a unique criterion of our app's judgment.

3, IDFV (for vender identifer)

// Get IDFV (vender identifier) NSString * idsvstr =  [[[Asidentifiermanager sharedmanager]identifierforvendor]uuidstring];

This is an identifier for vender, what is vender, is actually the previous part of our bundleidentifer, for example COM.APPLE.APP1 and com.apple.app2 have the same vender (Com.apple).

Advantages: 1, the same device of the same Vender app, get the IDFV are consistent;

2. The user cannot manually restrict or change IDFV directly

Disadvantage: 1, delete all the same vender under the app, in the re-download, IDFV will change (for the general number of company apps, can be understood as, delete re-download, IDFV will change)

2, restore the factory settings will change IDFV

Therefore, the stability of IDFV than IDFA, should be preferred IDFV, but also can be combined to track their own app users.

4. MAC address

The MAC address is: IEEE for administration and distribution. Each MAC address consists of two parts, the vendor code and the serial number, respectively. The first 24 bits of the binary represent the vendor code. The remaining 24 bits are assigned by the vendor themselves. So by the IEEE to ensure that the first 24 bits do not repeat, and then by the various manufacturers to ensure that the last 24 bits are not duplicated, together, the entire 48bit MAC address will not be duplicated.

But in IOS7 Apple Sysctl and IOCTL were technically processed, allowing the MAC address to return to 02:00:00:00:00:00.

Summary of unique identities for iOS

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.