0

I am building a framework in iOS where I need an unique key which will never change even after the localization, I was using the below code to generate one

NSDictionary *infoPlist = [[NSBundle bundleForClass:[AISSUtility class]] infoDictionary];
    NSString *name = [infoPlist objectForKey:@"CFBundleDisplayName"];
    NSString *identifier = [infoPlist objectForKey:@"CFBundleIdentifier"];

    NSString *UniqueID = [NSString stringWithFormat:@"%@.%@", name, identifier];

but localization may change the app name which will in turn changes the bundle name,

I cant even use the device vender ID, as I am going to use this in some library , multiple apps can be installed on the same device which uses my library,

Please suggest me some Unique ID which meets my requirement, thanx in advance

Ravi Kiran
  • 219
  • 3
  • 14
  • 3
    What's wrong with the bundle identifier alone? – trojanfoe Apr 15 '16 at 09:28
  • You are mixing things there. Bundle identifier identifies the application (same for all devices), and vendor identifier identifies the device (same for all applications of the same vendor). Which one are you looking for? – redent84 Apr 15 '16 at 09:29
  • Bundle ID could be like com.somename.<$CFBundleDisplayName > , which is dependent on the app name rt? so it has potential to get changed due to localization I am thinking,, pls correct me if I am wrong – Ravi Kiran Apr 15 '16 at 10:12
  • Apple provides the app id to your app after you created it in the appstore. would that be helpful? Dont know if it can be received during runtime, though. – thst Apr 15 '16 at 10:53

0 Answers0