Unique identifier in ios 7

Until giving up uniqueIdentifier, it was good to use the same identifier, even by uninstalling the application and even erasing the iPhone. After that, I use the MAC address, which also worked before iOS 7, but with iOS 7 it gives 2c: 00: 00: 00: 00: 00. Therefore, I don't get any way to get a unique identifier. If IdentifierForVender is used: it gives a different identifier if I uninstall the entire application of the same provider.

MAC Address: It works fine, but not on iOS 7.

Unique identifier: deprecated.

Please tell me how to get a unique value, even uninstalling the application and even erasing the iPhone (for example, restoring the factory)

+4
source share
5

. , , iPhone. , .

UIDevice.

-2

3

UUID , -, . iOS7.


2

. iOS 7 , uniqueIdentifier iOS7.


.

enter image description here

. .


1

, , reset. . .

,

1) MD5 MAC + CFBundleIdentifier

[[UIDevice currentDevice] uniqueDeviceIdentifier]

, . , . reset, .

2) MD5 MAC

[[UIDevice currentDevice] uniqueGlobalDeviceIdentifier]

. , . reset, .

+4

- (, UUID) iOS.

, , .

Apple.

+2

, iOS . Apple , . .

Apple , . Apple , . Apple , .. Apple .

Apple API, UUID // ( ). , . MAC- .

. UDID MAC- , . , , . , . , ? , ID ? , , ?

, . , ? ? , , , , ?

, , .

, .

+2

ForVendor, ForVendor , . , ForVendor .

ForVendor , , ForVendor .

"", ForVendor, ForVendor .

- () checkAndSetDefaultKeychainsOfAppAndSetSecurityStatus
{
        KeychainItemWrapper * wrapper = [[KeychainItemWrapper alloc] init];
    if (! [wrapper searchKeychainCopyMatching: @" DeviceId "]) {
              [wrapper createKeychainValue: [UIDevice currentDevice].identifierForVendor.UUIDString forIdentifier: @ "DeviceId" ];
      }
        self.strDeviceid = [wrapper getDataFromKeychainMatching: @ "DeviceId" ];
        NSLog (@" % @ ", self.strDeviceid);
        [];
}

- (NSString *) stringforDeviceId
{
    KeychainItemWrapper * wrapper = [[KeychainItemWrapper alloc] init];
        if (! [wrapper searchKeychainCopyMatching: @"DeviceId "]) {
                  [wrapper createKeychainValue: [UIDevice currentDevice] .identifierForVendor.UUIDString forIdentifier: @ "DeviceId"];
       }
        return [wrapper getDataFromKeychainMatching: @ "DeviceId"];
}

Please let me know if you have any questions. I will be happier to clean.

+1
source

All Articles