「ios」iponeとandroidのバージョンを取得するサンプルコード

サンプルコード
– (void)viewDidLoad {
[super viewDidLoad];

NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];
NSLog(@"–phoneVersion–%@—–“,phoneVersion);

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSLog(@"–infoDictionary–%@—–“,infoDictionary);

NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSLog(@"–appCurVersion—%@—–“,appCurVersion);

IOS

Posted by arkgame