Try this in your appdelegates for Objective-C
NSString *uniqueId = [SSKeychain passwordForService:@"YOUR_PROJECT_IDENTIFIER" account:@"unique_id"];
if ([uniqueId length]==0)
{
uniqueId = [AppDelegate uuid];
[SSKeychain setPassword:uniqueId forService:@"Store credentials in Keychain Identifier" account:@"unique_id"];
}
[[NSUserDefaults standardUserDefaults] setValue:uniqueId forKey:@"iPhoneUniqueID"];
NSLog(@"Device_ID:%@",uniqueId);
source
share