美文网首页
iOS 获取系统信息

iOS 获取系统信息

作者: 尼洛1994 | 来源:发表于2017-02-06 10:24 被阅读0次

    iOS获取系统信息

    1. 当前应用软件版本 比如:1.0.1
    NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];  
    NSLog(@"当前应用软件版本:%@",appCurVersion);
    
    1. 当前应用版本号码 (编译版本号)
    NSString *appCurVersionNum = [infoDictionary objectForKey:@"CFBundleVersion"];  
    NSLog(@"当前应用版本号码:%@",appCurVersionNum);
    
    1. 获取应用信息
    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
    
    1. 当前应用名称
    NSString *appCurName = [infoDictionary objectForKey:@"CFBundleDisplayName"];  
    NSLog(@"当前应用名称:%@",appCurName);
    
    1. 获取手机系统版本号
    NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];  
    NSLog(@"手机系统版本: %@", phoneVersion);
    
    1. 获取手机序列号
    NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier];  
    NSLog(@"手机序列号: %@",identifierNumber);
    
    1. 获取手机型号
    NSString* phoneModel = [[UIDevice currentDevice] model];  
    NSLog(@"手机型号: %@",phoneModel );
    
    1. 获取手机设备名称
    NSString* deviceName = [[UIDevice currentDevice] systemName];  
    NSLog(@"设备名称: %@",deviceName );
    
    1. 获取手机别名
    NSString* userPhoneName = [[UIDevice currentDevice] name];  
    NSLog(@"手机别名: %@", userPhoneName);
    
    1. 跳转设置
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
    跳转特定设置:
    例如:
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];
    About — prefs:root=General&path=About  
    Accessibility — prefs:root=General&path=ACCESSIBILITY  
    AirplaneModeOn— prefs:root=AIRPLANE_MODE  
    Auto-Lock — prefs:root=General&path=AUTOLOCK  
    Brightness — prefs:root=Brightness  
    Bluetooth — prefs:root=General&path=Bluetooth
    Date& Time — prefs:root=General&path=DATE_AND_TIME  
    FaceTime — prefs:root=FACETIME
    General— prefs:root=General
    Keyboard — prefs:root=General&path=Keyboard  
    iCloud — prefs:root=CASTLE  iCloud 
    Storage & Backup — prefs:root=CASTLE&path=STORAGE_AND_BACKUP  
    International — prefs:root=General&path=INTERNATIONAL  
    Location Services — prefs:root=LOCATION_SERVICES  
    Music — prefs:root=MUSIC  
    Music Equalizer — prefs:root=MUSIC&path=EQ  
    Music VolumeLimit— prefs:root=MUSIC&path=VolumeLimit  
    Network — prefs:root=General&path=Network  
    Nike + iPod — prefs:root=NIKE_PLUS_IPOD  
    Notes — prefs:root=NOTES  
    Notification — prefs:root=NOTIFICATIONS_ID  
    Phone — prefs:root=Phone  
    Photos — prefs:root=Photos  
    Profile — prefs:root=General&path=ManagedConfigurationList  
    Reset — prefs:root=General&path=Reset  
    Safari — prefs:root=Safari  Siri — prefs:root=General&path=Assistant  
    Sounds — prefs:root=Sounds  
    SoftwareUpdate— prefs:root=General&path=SOFTWARE_UPDATE_LINK  
    Store — prefs:root=STORE  
    Twitter — prefs:root=TWITTER  
    Usage — prefs:root=General&path=USAGE  
    VPN — prefs:root=General&path=Network/VPN  
    Wallpaper — prefs:root=Wallpaper  
    Wi-Fi — prefs:root=WIFI
    Setting—prefs:root=INTERNET_TETHERING
    

    卓悦官网

    相关文章

      网友评论

          本文标题:iOS 获取系统信息

          本文链接:https://www.haomeiwen.com/subject/aqmyittx.html