iOS 如何获取设备信息

2019-02-20  本文已影响0人  Cc馒头
NSString *device = [[UIDevice currentDevice].identifierForVendor UUIDString];
NSString *systemVersion   =   [[UIDevice currentDevice] systemVersion];
NSString *systemModel = [[UIDevice currentDevice] model];
NSDictionary *dic =  [[NSBundle mainBundle] infoDictionary]; 
NSString *appName = [dic objectForKey:@"CFBundleIdentifier"];  
NSString *appVersion = [dic valueForKey:@"CFBundleVersion"];     
NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:  
    deviceID, @"deviceID",  
    systemVersion, @"systemVersion",  
    systemModel, @"systemModel",  
    appName, @"appName",  
    appVersion, @"appVersion",nil]; 
上一篇 下一篇

猜你喜欢

热点阅读