ylechelle / OpenUDID

[OpenUDID IS NOW DEPRECATED] Open source initiative for a universal and persistent UDID solution for iOS
OpenUDID.org
2.09k stars 435 forks source link

I found that the appUID was not stored #73

Open YYXuelangwang opened 3 years ago

YYXuelangwang commented 3 years ago

First of all, thank you for taking the time to check my questions. and Please forgive my poor English

   NSString * appUID = (NSString *) [defaults objectForKey:kOpenUDIDAppUIDKey];
    if(appUID == nil)
    {
      // generate a new uuid and store it in user defaults
      CFUUIDRef uuid = CFUUIDCreate(NULL);
      appUID = (NSString *) CFUUIDCreateString(NULL, uuid);
      CFRelease(uuid);
    }

The appUID from NSUserDefaults,but when i search the kOpenUDIDAppUIDKey, i found that the appuID was not stored;

Whether the code below should be changed

   if (localDict && saveLocalDictToDefaults)
        [defaults setObject:localDict forKey:kOpenUDIDKey];

changed like this

    if (localDict && saveLocalDictToDefaults){
        [defaults setObject:localDict forKey:kOpenUDIDKey];
        [defaults setObject:appUID forKey:kOpenUDIDAppUIDKey];
    }