iOS application, often use to some of the program itself parameter settings, so record a pen.
1 //Build Number2NSString *version = [[[NSBundle Mainbundle] infodictionary] Objectforkey:@"cfbundleversion"];3 //Version number4NSString *shortversion = [[[NSBundle Mainbundle] infodictionary] Objectforkey:@"cfbundleshortversionstring"];5 //Bundle ID6NSString *bundleid = [[[NSBundle Mainbundle] infodictionary] Objectforkey:@"Cfbundleidentifier"];
See here, seems to understand, in fact, the above key is the app inside the Info.plist some key. You can open the Info.plist file and get the corresponding key value according to your needs.
The following list is common:
1 //device Name: IPhone Simulator2NSString *strname =[[Uidevice Currentdevice] name];3NSLog (@"device Name:%@", strsysname);4 5 //system name: IPhone OS6NSString *strsysname =[[Uidevice Currentdevice] systemName];7NSLog (@"system name:%@", strsysname);8 9 //System version number: 9.2TenNSString *strsysversion =[[Uidevice Currentdevice] systemversion]; OneNSLog (@"System version number:%@", strsysversion); A - //Device mode: IPhone -NSString *strmodel =[[Uidevice Currentdevice] model]; theNSLog (@"Device mode:%@", Strmodel); - - //Local Device mode: IPhone -NSString *strlocmodel =[[Uidevice Currentdevice] localizedmodel]; +NSLog (@"Local Device mode:%@", Strlocmodel); - + //Get user Language preferences A //language: En -US atNsarray *languagearray =[Nslocale preferredlanguages]; -NSString *language = [Languagearray objectatindex:0]; - - //Country: en_US -Nslocale *locale =[Nslocale Currentlocale]; -NSString *country =[locale localeidentifier]; in - //gets the unique identifier of the device to //468585ab-d694-46d0-a6e1-354714e8e23b +NSString *identifier = [[[Uidevice Currentdevice] Identifierforvendor] uuidstring];
Also includes the network type judgment, the battery power obtains and so on. But not commonly used, it is not included.
Get app information in the IOS program