-(NSString*)getDeviceId{
NSString* uuidString = nil;
if (![[NSUserDefaults standardUserDefaults] objectForKey:@"deviceId"]) {
CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
CFStringRef strRef = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
uuidString = [NSString stringWithString:(NSString*)strRef];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setValue:uuidString forKey:@"deviceId"];
[defaults synchronize];
CFRelease(strRef);
CFRelease(uuidRef);
}else{
uuidString = [[NSUserDefaults standardUserDefaults] objectForKey:@"deviceId"];
}
return uuidString;
}