IOS-獲取Model(設備型號)、Version(設備版本號)、app(程序版本號)等

    // app名稱ios

    NSString *app_Name1 = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];app

    

    NSString *app_Name = [NSString stringWithFormat:@"%@",[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleNameKey]];iphone

    

    NSString *app_Name2 = [NSString stringWithFormat:@"%@",[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleExecutableKey]];ide

    

    NSLog(@"==============1%@-----%@---%@",app_Name1,app_Name,app_Name2);post

    

    // app版本ui

    

    NSString *app_Version1 = [NSString stringWithFormat:@"v%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*) kCFBundleVersionKey]];spa

    

    NSString *app_Version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];3d

    NSLog(@"==============1%@---%@",app_Version1,app_Version);orm

    

    // app build版本blog

    NSString *app_build1 = [NSString stringWithFormat:@"v%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]];

    

    NSString *app_build = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];

    NSLog(@"==============1%@---%@",app_build1,app_build);


    

    //ios獲取系統信息

    //NSLog(@"identifier: %@", [[UIDevice currentDevice] identifierForVendor]);

    //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]);

        IOS獲取IP 參考:http://blog.zachwaugh.com/post/309927273/programmatically-retrieving-ip-address-of-iphone

相關文章
相關標籤/搜索