Our iOS application is for specific users. So, we used device unique identifier for user identification. This approach works fine till iOS 6, because we are
Use this little helper method to keep identifier in Keychain between install/delete sessions of app
-(NSString *)getUniqueDeviceIdentifierAsString
{
NSString *appName=[[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleNameKey];
NSString *strApplicationUUID = [SSKeychain passwordForService:appName account:@"incoding"];
if (strApplicationUUID == nil)
{
strApplicationUUID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
[SSKeychain setPassword:strApplicationUUID forService:appName account:@"incoding"];
}
return strApplicationUUID;
}
Add the SSKeychain library to your project, e.g. via Cocoapods with pod 'SSKeychain'