Gets the unique identifier of the Apple device

Source: Internet
Author: User

1. Disabled-[uidevice uniqueidentifier]
Apple always sees the user's privacy as important. -[uidevice uniqueidentifier] was abandoned at the time of IOS5 's actual iOS5, but it was completely disabled in iOS7. Xcode5 won't even allow you to compile apps that contain guidelines to-[uidevice uniqueidentifier]. In addition, the app that used-[uidevice uniqueidentifier] before IOS7 would not return the device's UUID if it ran on iOS7, but instead would return a string of strings, starting with FFFFFFFF, followed by-[uidevice The hexadecimal value of Identifierforvendor].
3.MAC address can no longer be used to set up the device
Another way to generate unique identifiers for iOS devices is to use the media Access Control (MAC) address of your iOS device. A MAC address is a unique number that is assigned to the network adapter at the physical network level. At this address, Apple has other names, such as a hardware address or a WiFi address, which means the same thing. Hardware
There are many projects and frameworks that use this method to generate a unique device ID. such as Odin. However, Apple does not want someone to tell the user through the MAC address, so if you query the MAC address on the IOS7 system, it will now only return 02:00:00:00:00:00.
Now Apple has made it clear that you should use-[uidevice Identifierforvendor] or-[asidentifiermanager advertisingidentifier] as a unique identifier for your frame and app. Frankly speaking, it is not so difficult to deal with these changes, see the following code snippet:
nsstring *identifierforvendor = [[Uidevice currentdevice].identifierforvendor uuidstring];
nsstring *identifierforadvertising = [[Asidentifiermanager sharedmanager].advertisingidentifier UUIDString];
Each method is adapted to a particular usage:
   Identifierforvendor is the only value for a vendor, which means that an app issued by the same company will have the same identifier when it runs on the same device. However, if the user removes the vendor's app and then re-installs it, the identifier will be inconsistent.
Advertisingidentifier will return the same value for all software vendors on this device, so it can only be used when advertising. This value can change in many cases, such as when the user initializes the device.

Gets the unique identifier of the Apple device

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.