您的位置:首页 > 其它

常见的程序的属性获取(版本号,bundle id 等)

2015-07-31 09:05 381 查看
NSString *deviceID = [UIDevice currentDevice] uniqueIdentifier];//设备id

// NSString *deviceID = [UIApplication sharedApplication] uuid];

NSString *systemVersion = [UIDevice currentDevice] systemVersion];//系统版本

NSString *systemModel = [UIDevice currentDevice] model];//是iphone 还是 ipad

NSDictionary *dic = [NSBundle mainBundle] infoDictionary];//获取info-plist

NSString *appName = [dic objectForKey:@"CFBundleIdentifier"];//获取Bundle identifier

NSString *appVersion = [dic valueForKey:@"CFBundleVersion"];//获取Bundle Version

NSDictionary *userInfo = [NSDictionary alloc] initWithObjectsAndKeys:

deviceID, @"deviceID",

systemVersion, @"systemVersion",

systemModel, @"systemModel",

appName, @"appName",

appVersion, @"appVersion",nil];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: