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