1 // 应用名称 2 NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; 3 NSString *appName = [infoDictionary objectForKey:@"CFBundleDisplayName"]; 4 NSLog(@"应用名称:%@",appName); 5 6 // 版本号 7 NSString *shortVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; 8 NSLog(@"版本号:%@",shortVersion); 9 10 // 版本号(int类型) 11 NSString *version = [infoDictionary objectForKey:@"CFBundleVersion"]; 12 NSLog(@"版本号(int类型):%@",version); 13 14 // 手机标识符 15 NSUUID* identifierForVendor = [[UIDevice currentDevice] identifierForVendor]; 16 NSLog(@"手机标识符: %@",identifierForVendor); 17 18 // 手机 19 CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); 20 NSString *uuid = (NSString *)CFBridgingRelease(CFUUIDCreateString(kCFAllocatorDefault,uuidRef)); 21 NSLog(@"手机uuid: %@",uuid); 22 23 // 系统 24 NSString *systemName = [[UIDevice currentDevice] systemName]; 25 NSLog(@"系统: %@",systemName ); 26 27 // 手机系统版本 28 NSString* systemVersion = [[UIDevice currentDevice] systemVersion]; 29 NSLog(@"手机系统版本: %@", systemVersion); 30 31 // 用户手机名 32 NSString* phoneName = [[UIDevice currentDevice] name]; 33 NSLog(@"用户手机名: %@", phoneName); 34 35 // 手机型号 36 NSString *phoneModel = [[UIDevice currentDevice] model]; 37 NSLog(@"手机型号: %@",phoneModel ); 38 39 // 地方型号 40 NSString *localizedModel = [[UIDevice currentDevice] localizedModel]; 41 NSLog(@"地方型号: %@",localizedModel);
尊重作者劳动成果,转载请注明: 【kingdev】
时间: 2024-10-11 21:41:20