我想检查设备的iOS版本是否大于3.1.3我尝试过以下操作:

[[UIDevice currentDevice].systemVersion floatValue]

但它不起作用,我只想要一个:

if (version > 3.1.3) { }

我该如何实现?


#1楼

+(BOOL)doesSystemVersionMeetRequirement:(NSString *)minRequirement{// eg  NSString *reqSysVer = @"4.0";NSString *currSysVer = [[UIDevice currentDevice] systemVersion];if ([currSysVer compare:minRequirement options:NSNumericSearch] != NSOrderedAscending){return YES;}else{return NO;}}

#2楼

Obj-C ++ 11中的一个更通用的版本(您可以用NSString / C函数替换其中的某些东西,但这并不那么冗长。这提供了两种机制。splitSystemVersion提供了所有部分的数组,如果您只想打开主要版本(例如switch([self splitSystemVersion][0]) {case 4: break; case 5: break; } )。

#include <boost/lexical_cast.hpp>- (std::vector<int>) splitSystemVersion {std::string version = [[[UIDevice currentDevice] systemVersion] UTF8String];std::vector<int> versions;auto i = version.begin();while (i != version.end()) {auto nextIllegalChar = std::find_if(i, version.end(), [] (char c) -> bool { return !isdigit(c); } );std::string versionPart(i, nextIllegalChar);i = std::find_if(nextIllegalChar, version.end(), isdigit);versions.push_back(boost::lexical_cast<int>(versionPart));}return versions;
}/** Losslessly parse system version into a number* @return <0>: the version as a number,* @return <1>: how many numeric parts went into the composed number. e.g.* X.Y.Z = 3.  You need this to know how to compare again <0>*/
- (std::tuple<int, int>) parseSystemVersion {std::string version = [[[UIDevice currentDevice] systemVersion] UTF8String];int versionAsNumber = 0;int nParts = 0;auto i = version.begin();while (i != version.end()) {auto nextIllegalChar = std::find_if(i, version.end(), [] (char c) -> bool { return !isdigit(c); } );std::string versionPart(i, nextIllegalChar);i = std::find_if(nextIllegalChar, version.end(), isdigit);int part = (boost::lexical_cast<int>(versionPart));versionAsNumber = versionAsNumber * 100 + part;nParts ++;}return {versionAsNumber, nParts};
}/** Assume that the system version will not go beyond X.Y.Z.W format.* @return The version string.*/
- (int) parseSystemVersionAlt {std::string version = [[[UIDevice currentDevice] systemVersion] UTF8String];int versionAsNumber = 0;int nParts = 0;auto i = version.begin();while (i != version.end() && nParts < 4) {auto nextIllegalChar = std::find_if(i, version.end(), [] (char c) -> bool { return !isdigit(c); } );std::string versionPart(i, nextIllegalChar);i = std::find_if(nextIllegalChar, version.end(), isdigit);int part = (boost::lexical_cast<int>(versionPart));versionAsNumber = versionAsNumber * 100 + part;nParts ++;}// don't forget to pad as systemVersion may have less parts (i.e. X.Y).for (; nParts < 4; nParts++) {versionAsNumber *= 100;}return versionAsNumber;
}

#3楼

使用nv-ios-version项目(Apache许可证,版本2.0)中包含的Version类,可以轻松获取和比较iOS版本。 下面的示例代码转储iOS版本,并检查该版本是否大于或等于6.0。

// Get the system version of iOS at runtime.
NSString *versionString = [[UIDevice currentDevice] systemVersion];// Convert the version string to a Version instance.
Version *version = [Version versionWithString:versionString];// Dump the major, minor and micro version numbers.
NSLog(@"version = [%d, %d, %d]",version.major, version.minor, version.micro);// Check whether the version is greater than or equal to 6.0.
if ([version isGreaterThanOrEqualToMajor:6 minor:0])
{// The iOS version is greater than or equal to 6.0.
}// Another way to check whether iOS version is
// greater than or equal to 6.0.
if (6 <= version.major)
{// The iOS version is greater than or equal to 6.0.
}

项目页面: nv-ios-version
TakahikoKawasaki / nv-ios-version

博客:在运行时使用Version类获取并比较iOS版本
在运行时使用Version类获取并比较iOS版本


#4楼

正如建议苹果官方文档 :您可以使用NSFoundationVersionNumber ,从NSObjCRuntime.h头文件。

if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {// here you go with iOS 7
}

#5楼

if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {// Your code here
}

当然,必须将NSFoundationVersionNumber_iOS_6_1更改为适用于您要检查的iOS版本。 我现在编写的内容可能会在测试设备运行的是iOS7或更早版本时被大量使用。


#6楼

作为yasimturks解决方案的一种变体,我定义了一个函数和一些枚举值,而不是五个宏。 我觉得它更优雅,但这是一个品味问题。

用法:

if (systemVersion(LessThan, @"5.0")) ...

.h文件:

typedef enum {LessThan,LessOrEqual,Equal,GreaterOrEqual,GreaterThan,NotEqual
} Comparison;BOOL systemVersion(Comparison test, NSString* version);

.m文件:

BOOL systemVersion(Comparison test, NSString* version) {NSComparisonResult result = [[[UIDevice currentDevice] systemVersion] compare: version options: NSNumericSearch];switch (test) {case LessThan:       return result == NSOrderedAscending;case LessOrEqual:    return result != NSOrderedDescending;case Equal:          return result == NSOrderedSame;case GreaterOrEqual: return result != NSOrderedAscending;case GreaterThan:    return result == NSOrderedDescending;case NotEqual:       return result != NSOrderedSame;}
}

您应该将应用程序的前缀添加到名称中,尤其是在“ Comparison类型中。


#7楼

有7.0或6.0.3之类的版本,因此我们可以简单地将版本转换为数字以进行比较。 如果版本是7.0,只需在其后附加另一个“ .0”,然后获取其数值即可。

 int version;NSString* iosVersion=[[UIDevice currentDevice] systemVersion];NSArray* components=[iosVersion componentsSeparatedByString:@"."];if ([components count]==2) {iosVersion=[NSString stringWithFormat:@"%@.0",iosVersion];}iosVersion=[iosVersion stringByReplacingOccurrencesOfString:@"." withString:@""];version=[iosVersion integerValue];

对于6.0.0

  if (version==600) {// Do something}

为7.0

 if (version==700) {// Do something}

#8楼

试试下面的代码:

NSString *versionString = [[UIDevice currentDevice] systemVersion];

#9楼

尝试这个

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
// do some work
}

#10楼

#define _kisiOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)if (_kisiOS7) {NSLog(@"iOS7 or greater")
}
else {NSLog(@"Less than iOS7");
}

#11楼

使用快速忘记[[UIDevice currentDevice] systemVersion]和NSFoundationVersionNumber来检查系统版本的新方法。

我们可以使用NSProcessInfo -isOperatingSystemAtLeastVersion

     import Foundationlet yosemite = NSOperatingSystemVersion(majorVersion: 10, minorVersion: 10, patchVersion: 0)NSProcessInfo().isOperatingSystemAtLeastVersion(yosemite) // false

#12楼

我知道这是一个老问题,但是应该有人提到了Availability.h中的编译时宏。 这里的所有其他方法都是运行时解决方案,将无法在头文件,类类别或ivar定义中使用。

对于这些情况,请使用

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_6_0// iOS 6+ code here
#else// Pre iOS 6 code here
#endif

h / t 这个答案


#13楼

这用于检查Xcode中兼容的SDK版本,这是如果您有一个拥有不同Xcode版本的大型团队或支持共享相同代码的不同SDK的多个项目:

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000//programming in iOS 8+ SDK here
#else//programming in lower than iOS 8 here
#endif

您真正想要的是检查设备上的iOS版本。 您可以这样做:

if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.0) {//older than iOS 8 code here
} else {//iOS 8 specific code here
}

迅捷版:

if let version = Float(UIDevice.current.systemVersion), version < 9.3 {//add lower than 9.3 code here
} else {//add 9.3 and above code here
}

swift的当前版本应使用以下版本:

if #available(iOS 12, *) {//iOS 12 specific code here
} else {//older than iOS 12 code here
}

#14楼

参加聚会有点晚,但是鉴于iOS 8.0,这可能是相关的:

如果可以避免使用

[[UIDevice currentDevice] systemVersion]

而是检查是否存在方法/类/其他内容。

if ([self.yourClassInstance respondsToSelector:@selector(<yourMethod>)])
{ //do stuff
}

我发现它对于位置管理器很有用,在这里我必须为iOS 8.0调用requestWhenInUseAuthorization,但该方法不适用于iOS <8


#15楼

使用推荐的推荐方法...如果头文件中没有定义,则始终可以使用所需IOS版本的设备在控制台上打印版本。

- (BOOL) isIOS8OrAbove{float version802 = 1140.109985;float version8= 1139.100000; // there is no def like NSFoundationVersionNumber_iOS_7_1 for ios 8 yet?NSLog(@"la version actual es [%f]", NSFoundationVersionNumber);if (NSFoundationVersionNumber >= version8){return true;}return false;
}

#16楼

首选方法

在Swift 2.0中,Apple使用了更为方便的语法( 在此处了解更多信息 )添加了可用性检查。 现在,您可以使用更简洁的语法检查操作系统版本:

if #available(iOS 9, *) {// Then we are on iOS 9
} else {// iOS 8 or earlier
}

这比检查respondsToSelector等( Swift的新增功能 )优先。 现在,如果您没有适当地保护代码,编译器将始终警告您。


迅捷版2.0

iOS 8中的新功能是NSProcessInfo允许进行更好的语义版本检查。

在iOS 8及更高版本上进行部署

对于iOS 8.0或更高版本的最低部署目标,请使用NSProcessInfo operatingSystemVersionisOperatingSystemAtLeastVersion

这将产生以下结果:

let minimumVersion = NSOperatingSystemVersion(majorVersion: 8, minorVersion: 1, patchVersion: 2)
if NSProcessInfo().isOperatingSystemAtLeastVersion(minimumVersion) {//current version is >= (8.1.2)
} else {//current version is < (8.1.2)
}

在iOS 7上部署

对于iOS 7.1或更低版本的最低部署目标,请在UIDevice systemVersion上与NSStringCompareOptions.NumericSearch进行比较。

这将产生:

let minimumVersionString = "3.1.3"
let versionComparison = UIDevice.currentDevice().systemVersion.compare(minimumVersionString, options: .NumericSearch)
switch versionComparison {case .OrderedSame, .OrderedDescending://current version is >= (3.1.3)breakcase .OrderedAscending://current version is < (3.1.3)fallthroughdefault:break;
}

在NSHipster上内容。


#17楼

float deviceOSVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
float versionToBeCompared = 3.1.3; //(For Example in your case)if(deviceOSVersion < versionToBeCompared)//Do whatever you need to do. Device version is lesser than 3.1.3(in your case)
else //Device version should be either equal to the version you specified or above

#18楼

实际可行的Swift示例:

switch UIDevice.currentDevice().systemVersion.compare("8.0.0", options: NSStringCompareOptions.NumericSearch) {
case .OrderedSame, .OrderedDescending:println("iOS >= 8.0")
case .OrderedAscending:println("iOS < 8.0")
}

不要使用NSProcessInfo,因为它在8.0下无法正常工作,因此直到2016年几乎没有用


#19楼

我总是将它们保存在我的Constants.h文件中:

#define IS_IPHONE5 (([[UIScreen mainScreen] bounds].size.height-568)?NO:YES)
#define IS_OS_5_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 5.0)
#define IS_OS_6_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0)
#define IS_OS_7_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define IS_OS_8_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

#20楼

在Swift中检查iOS版本的解决方案

switch (UIDevice.currentDevice().systemVersion.compare("8.0.0", options: NSStringCompareOptions.NumericSearch)) {case .OrderedAscending:println("iOS < 8.0")case .OrderedSame, .OrderedDescending:println("iOS >= 8.0")
}

此解决方案的缺点:不管使用哪种方式,都要检查OS版本号简直是一个坏习惯。 永远不要以这种方式硬编码依赖项,总要检查功能,特性或类的存在。 考虑一下; 苹果可能会发布类的向后兼容版本,如果他们这样做了,那么您建议的代码将永远不会使用它,因为您的逻辑会寻找操作系统版本号,而不是该类的存在。

( 此信息的来源 )

在Swift中检查类是否存在的解决方案

if (objc_getClass("UIAlertController") == nil) {// iOS 7
} else {// iOS 8+
}

不要使用if (NSClassFromString("UIAlertController") == nil)因为它可以在使用iOS 7.1和8.2的iOS模拟器上正常运行,但是如果您在使用iOS 7.1的真实设备上进行测试,您将不幸地注意到您将永远不会通过通过代码片段的else部分。


#21楼

#define IsIOS8 (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1)

#22楼

这是一个快速版本:

struct iOSVersion {static let SYS_VERSION_FLOAT = (UIDevice.currentDevice().systemVersion as NSString).floatValuestatic let iOS7 = (Version.SYS_VERSION_FLOAT < 8.0 && Version.SYS_VERSION_FLOAT >= 7.0)static let iOS8 = (Version.SYS_VERSION_FLOAT >= 8.0 && Version.SYS_VERSION_FLOAT < 9.0)static let iOS9 = (Version.SYS_VERSION_FLOAT >= 9.0 && Version.SYS_VERSION_FLOAT < 10.0)
}

用法:

if iOSVersion.iOS8 {//Do iOS8 code here
}

#23楼

UIDevice + IOSVersion.h

@interface UIDevice (IOSVersion)+ (BOOL)isCurrentIOSVersionEqualToVersion:(NSString *)iOSVersion;
+ (BOOL)isCurrentIOSVersionGreaterThanVersion:(NSString *)iOSVersion;
+ (BOOL)isCurrentIOSVersionGreaterThanOrEqualToVersion:(NSString *)iOSVersion;
+ (BOOL)isCurrentIOSVersionLessThanVersion:(NSString *)iOSVersion;
+ (BOOL)isCurrentIOSVersionLessThanOrEqualToVersion:(NSString *)iOSVersion@end

UIDevice + IOSVersion.m

#import "UIDevice+IOSVersion.h"@implementation UIDevice (IOSVersion)+ (BOOL)isCurrentIOSVersionEqualToVersion:(NSString *)iOSVersion
{return [[[UIDevice currentDevice] systemVersion] compare:iOSVersion options:NSNumericSearch] == NSOrderedSame;
}+ (BOOL)isCurrentIOSVersionGreaterThanVersion:(NSString *)iOSVersion
{return [[[UIDevice currentDevice] systemVersion] compare:iOSVersion options:NSNumericSearch] == NSOrderedDescending;
}+ (BOOL)isCurrentIOSVersionGreaterThanOrEqualToVersion:(NSString *)iOSVersion
{return [[[UIDevice currentDevice] systemVersion] compare:iOSVersion options:NSNumericSearch] != NSOrderedAscending;
}+ (BOOL)isCurrentIOSVersionLessThanVersion:(NSString *)iOSVersion
{return [[[UIDevice currentDevice] systemVersion] compare:iOSVersion options:NSNumericSearch] == NSOrderedAscending;
}+ (BOOL)isCurrentIOSVersionLessThanOrEqualToVersion:(NSString *)iOSVersion
{return [[[UIDevice currentDevice] systemVersion] compare:iOSVersion options:NSNumericSearch] != NSOrderedDescending;
}@end

#24楼

仅用于检索OS版本字符串值:

[[UIDevice currentDevice] systemVersion]

#25楼

尝试:

NSComparisonResult order = [[UIDevice currentDevice].systemVersion compare: @"3.1.3" options: NSNumericSearch];
if (order == NSOrderedSame || order == NSOrderedDescending) {// OS version >= 3.1.3
} else {// OS version < 3.1.3
}

#26楼

快速答案...

从Swift 2.0开始,您可以在ifguard使用#available来保护仅应在某些系统上运行的代码。

if #available(iOS 9, *) {}

在Objective-C中,您需要检查系统版本并进行比较。

iOS 8及更高版本中的[[NSProcessInfo processInfo] operatingSystemVersion]

从Xcode 9开始:

if (@available(iOS 9, *)) {}

完整答案...

在Objective-C和Swift(在极少数情况下)中,最好避免依赖操作系统版本作为设备或OS功能的指示。 通常,有一种更可靠的方法来检查特定功能或类是否可用。

检查API是否存在:

例如,您可以使用NSClassFromString检查UIPopoverController在当前设备上是否可用:

if (NSClassFromString(@"UIPopoverController")) {// Do something
}

对于弱链接的类,直接向该类发送消息是安全的。 值得注意的是,这适用于未显式链接为“必需”的框架。 对于缺少的类,表达式的计算结果为nil,不满足以下条件:

if ([LAContext class]) {// Do something
}

一些类(例如CLLocationManagerUIDevice )提供了检查设备功能的方法:

if ([CLLocationManager headingAvailable]) {// Do something
}

检查符号是否存在:

有时,您必须检查常量的存在。 这是在iOS 8中引入的UIApplicationOpenSettingsURLString引入的,该-openURL:用于通过-openURL:加载“设置”应用程序。 该值在iOS 8之前不存在。向该API传递nil将会崩溃,因此您必须首先确保验证常量的存在:

if (&UIApplicationOpenSettingsURLString != NULL) {[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}

与操作系统版本比较:

假设您面对检查操作系统版本的需求相对较少。 对于面向iOS 8及更高版本的项目, NSProcessInfo包括一种用于执行版本比较的方法,出错的机会更少:

- (BOOL)isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version

针对较旧系统的项目可以在UIDevice上使用systemVersion 。 Apple在其GLSprite示例代码中使用了它。

// A system version of 3.1 or greater is required to use CADisplayLink. The NSTimer
// class is used as fallback when it isn't available.
NSString *reqSysVer = @"3.1";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) {displayLinkSupported = TRUE;
}

如果出于任何原因决定要使用systemVersion ,请确保将其视为字符串,否则可能会截断补丁修订版本号(例如3.1.2-> 3.1)。


#27楼

#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)

然后添加一个if条件,如下所示:

if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")) {//Your code
}

#28楼

Objective-C中启动Xcode 9:

if (@available(iOS 11, *)) {// iOS 11 (or newer) ObjC code
} else {// iOS 10 or older code
}

Swift中启动Xcode 7:

if #available(iOS 11, *) {// iOS 11 (or newer) Swift code
} else {// iOS 10 or older code
}

对于版本,您可以指定MAJOR,MINOR或PATCH(有关定义,请参见http://semver.org/ )。 例子:

  • iOS 11iOS 11.0是相同的最低版本
  • iOS 10iOS 10.3iOS 10.3.1是不同的最低版本

您可以输入以下任何系统的值:

  • iOSmacOSwatchOStvOS

从我的一个吊舱中获取的真实案例示例:

if #available(iOS 10.0, tvOS 10.0, *) {// iOS 10+ and tvOS 10+ Swift code
} else {// iOS 9 and tvOS 9 older code
}

文件资料


#29楼

/**  System Versioning Preprocessor Macros*/ #define SYSTEM_VERSION_EQUAL_TO(v)                  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v)              ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v)                 ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)/**  Usage*/ if (SYSTEM_VERSION_LESS_THAN(@"4.0")) {...
}if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"3.1.1")) {...
}

#30楼

通常,最好询问对象是否可以执行给定的选择器,而不是检查版本号来确定是否必须存在。

如果这不是一个选项,则您需要在这里[@"5.0" compare:@"5" options:NSNumericSearch]小心,因为[@"5.0" compare:@"5" options:NSNumericSearch]返回NSOrderedDescending ,这可能根本不是故意的。 我可能在这里期待NSOrderedSame 。 这至少是一种理论上的关注,在我看来这是值得抗拒的。

同样值得考虑的是版本输入错误的可能性,无法合理地比较。 苹果提供了三个预定义的常量NSOrderedAscendingNSOrderedSameNSOrderedDescending但是如果我无法比较两个事物,并且我想返回一个值来表明这一点,我可以想到使用一个名为NSOrderedUnordered的事物。

此外,Apple终有一天会扩展其三个预定义的常量以允许各种返回值,这并非不可能,这使得明智地进行比较!= NSOrderedAscending

这样说,请考虑以下代码。

typedef enum {kSKOrderedNotOrdered = -2, kSKOrderedAscending = -1, kSKOrderedSame = 0, kSKOrderedDescending = 1} SKComparisonResult;@interface SKComparator : NSObject
+ (SKComparisonResult)comparePointSeparatedVersionNumber:(NSString *)vOne withPointSeparatedVersionNumber:(NSString *)vTwo;
@end@implementation SKComparator
+ (SKComparisonResult)comparePointSeparatedVersionNumber:(NSString *)vOne withPointSeparatedVersionNumber:(NSString *)vTwo {if (!vOne || !vTwo || [vOne length] < 1 || [vTwo length] < 1 || [vOne rangeOfString:@".."].location != NSNotFound ||[vTwo rangeOfString:@".."].location != NSNotFound) {return SKOrderedNotOrdered;}NSCharacterSet *numericalCharSet = [NSCharacterSet characterSetWithCharactersInString:@".0123456789"];NSString *vOneTrimmed = [vOne stringByTrimmingCharactersInSet:numericalCharSet];NSString *vTwoTrimmed = [vTwo stringByTrimmingCharactersInSet:numericalCharSet];if ([vOneTrimmed length] > 0 || [vTwoTrimmed length] > 0) {return SKOrderedNotOrdered;}NSArray *vOneArray = [vOne componentsSeparatedByString:@"."];NSArray *vTwoArray = [vTwo componentsSeparatedByString:@"."];for (NSUInteger i = 0; i < MIN([vOneArray count], [vTwoArray count]); i++) {NSInteger vOneInt = [[vOneArray objectAtIndex:i] intValue];NSInteger vTwoInt = [[vTwoArray objectAtIndex:i] intValue];if (vOneInt > vTwoInt) {return kSKOrderedDescending;} else if (vOneInt < vTwoInt) {return kSKOrderedAscending;}}if ([vOneArray count] > [vTwoArray count]) {for (NSUInteger i = [vTwoArray count]; i < [vOneArray count]; i++) {if ([[vOneArray objectAtIndex:i] intValue] > 0) {return kSKOrderedDescending;}}} else if ([vOneArray count] < [vTwoArray count]) {for (NSUInteger i = [vOneArray count]; i < [vTwoArray count]; i++) {if ([[vTwoArray objectAtIndex:i] intValue] > 0) {return kSKOrderedAscending;}}}return kSKOrderedSame;
}
@end

如何查看iOS版本?相关推荐

  1. iOS 如何查看SDK版本

    查看iOS SDK的版本   MAC终端环境下,直接输入 xcodebuild -showsdks,回车即可 如图: 如果诸君对终端有兴趣,可以参考另一部经书<MAC终端快捷键实用>

  2. chrome浏览器ios版本迎来“信用卡扫描器”代码

    chrome浏览器ios版本迎来"信用卡扫描器"代码 近日,有开发者向 iOS 版 Chrome 谷歌浏览器提交了有关"信用卡扫描器"(Credit Card ...

  3. build unity 丢失_【厚积薄发】Unity 2017打包iOS版本参数丢失

    这是第178篇UWA技术知识分享的推送.今天我们继续为大家精选了若干和开发.优化相关的问题,建议阅读时间10分钟,认真读完必有收获. UWA 问答社区:answer.uwa4d.com 本期目录: U ...

  4. Unity打IOS版本遇到的问题(总)

    工作中是使用的是python脚本自动化打包IOS(unity导出成xcode工程,然后xcode工程再打包成ipa).打包大概流程以及一些操作的功能将在第五部分中介绍. 先介绍在打包中涉及到证书,证书 ...

  5. cocos creator 发布IOS版本(五)基础通用功能

    1.iOS 设置APP的名称多语言化(安装不同语言手机上显示不同游戏名) 参考链接: iOS 设置APP的名称(浅述APP版本国际化与本地化) - 简书 iOS支持多语言 - 简书 第一步,在Xcod ...

  6. android 苹果 蓝牙版本怎么升级,Android平台AIDA64更新至1.53版新增实用功能,可查看蓝牙版本...

    Android系统和iOS有一个著名检测软件AIDA64,其中Android平台近期更新至1.53版,除了新增几款新机型的识别外,更是加入了蓝牙版本的查看,这对于蓝牙耳机爱好者来说简直是一大福音. 要 ...

  7. linux查看系统版本信息命令

    几种查看Linux版本信息的方法: 1. uname -a 2. cat /proc/version 3. cat /etc/issue 4. lsb_release -a 详解 lsb_releas ...

  8. 如何查看linux版本

    1. 查看内核版本命令: 1) [root@q1test01 ~]# cat /proc/version    Linux version 2.6.9-22.ELsmp (bhcompile@crow ...

  9. 如何确定python对应电脑版本_查看Anaconda版本、Anaconda和python版本对应关系和快速下载...

    官网 查看Anaconda版本 (C:\ProgramData\Anaconda3) C:\Users\Administrator>conda -V conda 4.3.30 Anaconda和 ...

  10. Linux下的十个好用的命令工具:查看系统版本,显示目录的大小,查看硬盘HDD/SSD,硬盘测速,ssh时自动输入密码,查看程序的内存使用情况,查看I/O的速度,查看ssh密码错误日志,查找文件

    文章目录 1.查看系统版本 2.显示目录的大小 3.查看硬盘是HDD还是SSD 4.硬盘测速 5.在ssh的时候自动输入密码 6.查看程序的内存使用情况 7.查看I/O的速度 8.查看ssh密码错误日 ...

最新文章

  1. iOS开发-获取设备型号信息
  2. FastReport.net 使用记录
  3. 玩冒险岛java卸载_如何删除冒险岛安装了,现在不想玩
  4. oracle外部结合,浅谈Oracle外部文件
  5. DOM之innerHTML属性
  6. .NET下的开发者们正在继承计算机早期时代伟大的黑客精神
  7. 51单片机按键输入多位数_单片机实现八路抢答器实例分享
  8. android studio jdy08,JDY-08模块 蓝牙4.0 BLE CC2541 airsync iBeacon 兼容arduino
  9. excel 模糊查询
  10. unity检测范围内敌人_《Unity3D-控制检测碰撞以后触发的事件之敌人的攻击行为》...
  11. Android集成腾讯云通信IM
  12. DSPE;CAS:1069-79-0 ;二硬脂酰基磷脂酰乙醇胺;功能化磷脂
  13. Excel导入CSV文件(解决数值转换文本问题)
  14. node ref char*_「 volute 」树莓派+Node.js造一个有灵魂的语音助手
  15. ubuntu下各服务 重启命令
  16. 【实验】串口通信小试
  17. 订单中心探索业务系统数据预置助力快交付之路
  18. 数据结构 判断括号是否匹配
  19. 基于matlab的汽车操纵稳定性仿真分析,基于Matlab/Simulink的四轮转向汽车操纵稳定性分析...
  20. android菜单软件,悬浮菜单软件-悬浮菜单栏app下载1.0安卓最新版-西西软件下载

热门文章

  1. 小白也能看懂,30 分钟搭建个人博客!
  2. 查询微信被谁投诉方法技巧
  3. 一网打尽!2018网络安全事件最全的盘点
  4. 三角形周长最短问题_三角形周长最短的动点问题
  5. XMU毕业生总结写paper常用网站
  6. 关于bios+mbr还原uefi+gpt的系统后,出现进不去系统的问题
  7. 机器学习分类问题标签如何做编码
  8. 程序包com.wonhyoo.common.entity不存在, 找不到符号
  9. Unified diagnostic services (UDS)
  10. 14 POJ3363 Annoying painting tool