I have solved this by using advertisingIdentifier.
As I have seen there that advertisingIdentifier is
"An alphanumeric string unique to each device, ..."
For that I have used it as the unique identifier (though it is used for the serving advertisements).
My code is:
-(NSString*)UniqueAppId
{
NSString *Appname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
NSString *strApplicationUUID = [SSKeychain passwordForService:Appname account:@"manab"];
if (strApplicationUUID == nil)
{
strApplicationUUID = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
[SSKeychain setPassword:strApplicationUUID forService:Appname account:@"manab"];
}
return strApplicationUUID;
}
and just calling it when needed as
[self UniqueAppId];