iOS 获取设备型号,设备版本号,程序版本号

iOS 开发  常用到的方法

NSLog(@"uniqueIdentifier: %@", [[UIDevice currentDevice] uniqueIdentifier]);

NSLog(@"name: %@", [[UIDevice currentDevice] name]);

NSLog(@"systemName: %@", [[UIDevice currentDevice] systemName]);

NSLog(@"systemVersion: %@", [[UIDevice currentDevice] systemVersion]);

NSLog(@"model: %@", [[UIDevice currentDevice] model]);

NSLog(@"localizedModel: %@", [[UIDevice currentDevice] localizedModel]);

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

CFShow(infoDictionary);

// app名称

NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];

// app版本

NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];

// app build版本

NSString *app_build = [infoDictionary objectForKey:@"CFBundleVersion"];

时间: 2024-08-28 08:25:53

iOS 获取设备型号,设备版本号,程序版本号的相关文章

ios获取iphone手机设备型号

iPhone6plus和iPhone6在放大模式下也可以获取: 导入: #import "sys/utsname.h" 调用: - (NSString*)deviceString { // 需要#import "sys/utsname.h" struct utsname systemInfo; uname(&systemInfo); NSString *platform = [NSString stringWithCString:systemInfo.mac

获取Android版本信息和程序版本号

public class MainActivity extends ActionBarActivity { private TextView mTextView; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_m

iOS获取当前app的名称和版本号

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; CFShow(infoDictionary); // app名称 NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"]; // app版本 NSString *app_Version = [infoDictionary objectForKey:@&qu

iOS获取当前app的名称和版本号-by

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; CFShow(infoDictionary); // app名称 NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"]; // app版本 NSString *app_Version = [infoDictionary objectForKey:@&qu

js获取手机型号和手机操作系统版本号

1.js 判断IOS版本号 先来观察 iOS 的 User-Agent 串: iPhone 4.3.2 系统:Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5iPone 5.1 系统:Mozilla/5.0 (iPhone; U; CPU iPhone

iOS-获取Model(设备型号)、Version(设备版本号)、app(程序版本号)等

IOS-获取Model(设备型号).Version(设备版本号).app(程序版本号)等 NSLog(@"uniqueIdentifier: %@", [[UIDevice currentDevice] uniqueIdentifier]); NSLog(@"name: %@", [[UIDevice currentDevice] name]); NSLog(@"systemName: %@", [[UIDevice currentDevice]

iOS 获取最新设备型号方法

1.IOS 获取最新设备型号方法 列表最新对照表:http://theiphonewiki.com/wiki/Models 方法: #import "sys/utsname.h" struct utsname systemInfo; uname(&systemInfo); NSString *deviceString = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];

iOS获取设备型号、装置类型等信息

iOS获取设备型号.设备类型等信息 设备标识 关于设备标识,历史上盛行过很多英雄,比如UDID.Mac地址.OpenUDID等,然而他们都陆陆续续倒在了苹果的门下.苹果目前提供了2个方法供App获取设备标识:idfa和idfv idfa:全称advertisingIdentifier,官方解释是广告标识,适用于广告推广,这个建议不要轻易使用,如果用了,则App里必须提供广告功能,否则很有可能会在AppStore审核时被拒.而且idfa是可以被用户关闭的(设置->隐私),一旦被关闭,就获取不到了.

获取iOS设备型号的方法总结

三种常用的办法获取iOS设备的型号: 1. [UIDevice currentDevice].model (推荐): 2. uname(struct utsname *name) ,使用此函数需要#include : 3.sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) ,使用此函数需要#include ,#include: 推荐使用第一种方法,为最上层的API,在项目开发

iOS获取应用程序信息,版本号,程序名等

转载▼     iOS获取应用程序信息 NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; 其中的信息示范: 版本号:[infoDictionary objectForKey:@"CFBundleVersion"]; 应用程序名:[infoDictionary objectForKey:@"CFBundleDisplayName"]; { CFBundleDevelopment