You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ji...@apache.org on 2019/07/03 03:02:15 UTC
[incubator-weex] branch master updated: Upgrade iOS deployment
target to 9.0 (#2641)
This is an automated email from the ASF dual-hosted git repository.
jianhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new 29a600a Upgrade iOS deployment target to 9.0 (#2641)
29a600a is described below
commit 29a600a0989faace2cbbcec88ad238f3038c482e
Author: wqyfavor <qi...@alibaba-inc.com>
AuthorDate: Wed Jul 3 11:02:09 2019 +0800
Upgrade iOS deployment target to 9.0 (#2641)
* Upgrade iOS deployment target to 9.0
* Upgrade iOS deployment target to 9.0
* Upgrade iOS deployment target to 9.0
---
WeexSDK.podspec | 2 +-
ios/playground/Podfile | 2 +-
ios/playground/WeexDemo.xcodeproj/project.pbxproj | 17 ++++----
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 16 +++----
ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m | 23 +++-------
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm | 11 +----
.../WeexSDK/Sources/Component/WXVideoComponent.m | 5 +--
.../Sources/Controller/WXRootViewController.m | 51 ++--------------------
.../WeexSDK/Sources/Events/WXComponent+Events.m | 16 +++----
ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m | 14 +-----
.../WeexSDK/Sources/Manager/WXComponentManager.mm | 7 +--
ios/sdk/WeexSDK/Sources/Model/WXComponent.mm | 6 ---
ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m | 6 ---
ios/sdk/WeexSDK/Sources/Utility/WXConvert.m | 26 +++++------
ios/sdk/WeexSDK/Sources/Utility/WXUtility.m | 20 ++-------
15 files changed, 57 insertions(+), 165 deletions(-)
diff --git a/WeexSDK.podspec b/WeexSDK.podspec
index b99b514..37c3f7b 100644
--- a/WeexSDK.podspec
+++ b/WeexSDK.podspec
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
"doumafang " => "doumafang@gmail.com"
}
s.platform = :ios
- s.ios.deployment_target = '8.0'
+ s.ios.deployment_target = '9.0'
# use for public
# s.source = {
diff --git a/ios/playground/Podfile b/ios/playground/Podfile
index 1fe726b..5dca1b5 100644
--- a/ios/playground/Podfile
+++ b/ios/playground/Podfile
@@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
-platform :ios, '8.0'
+platform :ios, '9.0'
#inhibit_all_warnings!
def common
diff --git a/ios/playground/WeexDemo.xcodeproj/project.pbxproj b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
index 781aa06..06a0db7 100644
--- a/ios/playground/WeexDemo.xcodeproj/project.pbxproj
+++ b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
@@ -463,6 +463,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
Base,
);
@@ -735,7 +736,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -774,7 +775,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -799,7 +800,7 @@
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = WeexDemo/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
@@ -829,7 +830,7 @@
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = WeexDemo/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
@@ -847,7 +848,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = WeexDemoTests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.taobao.WeexDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -860,7 +861,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = WeexDemoTests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.taobao.WeexDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -890,7 +891,7 @@
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = "WeexUITestDemo-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = NO;
OTHER_LDFLAGS = (
@@ -920,7 +921,7 @@
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = "WeexUITestDemo-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = NO;
OTHER_LDFLAGS = (
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 79d916e..49a9125 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -3457,7 +3457,7 @@
CLANG_ENABLE_MODULES = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@@ -3469,7 +3469,7 @@
buildSettings = {
CLANG_ENABLE_MODULES = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@@ -3573,7 +3573,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
@@ -3627,7 +3627,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = (
"-fembed-bitcode",
@@ -3676,7 +3676,7 @@
);
INFOPLIST_FILE = WeexSDK/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
OTHER_CFLAGS = (
@@ -3732,7 +3732,7 @@
);
INFOPLIST_FILE = WeexSDK/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
OTHER_CFLAGS = (
@@ -3787,7 +3787,7 @@
);
INFOPLIST_FILE = "WeexSDK-Dynamic/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"-ObjC",
@@ -3834,7 +3834,7 @@
);
INFOPLIST_FILE = "WeexSDK-Dynamic/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"-ObjC",
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
index b6a932d..fabc1fe 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
@@ -546,11 +546,7 @@ _Pragma("clang diagnostic pop") \
__weak typeof(self) weakSelf = self;
[self callJSMethod:@"createInstanceContext" args:@[instanceIdString, newOptions, data?:@[]] onContext:nil completion:^(JSValue *instanceContextEnvironment) {
if (sdkInstance.pageName) {
- if (@available(iOS 8.0, *)) {
- [sdkInstance.instanceJavaScriptContext.javaScriptContext setName:sdkInstance.pageName];
- } else {
- // Fallback
- }
+ [sdkInstance.instanceJavaScriptContext.javaScriptContext setName:sdkInstance.pageName];
}
weakSelf.jsBridge.javaScriptContext[@"wxExtFuncInfo"]= nil;
@@ -683,16 +679,11 @@ _Pragma("clang diagnostic pop") \
NSString * bundleType = nil;
WXSDKInstance * instance = [WXSDKManager instanceForID:instanceIdString];
NSURLComponents * urlComponent = [NSURLComponents componentsWithString:instance.pageName?:@""];
- if (@available(iOS 8.0, *)) {
- for (NSURLQueryItem * queryItem in urlComponent.queryItems) {
- if ([queryItem.name isEqualToString:@"bundleType"] && [@[@"Vue", @"Rax", @"vue", @"rax"] containsObject:queryItem.value]) {
- bundleType = queryItem.value;
- return bundleType;
- }
+ for (NSURLQueryItem * queryItem in urlComponent.queryItems) {
+ if ([queryItem.name isEqualToString:@"bundleType"] && [@[@"Vue", @"Rax", @"vue", @"rax"] containsObject:queryItem.value]) {
+ bundleType = queryItem.value;
+ return bundleType;
}
- } else {
- // Fallback on earlier versions
- return bundleType;
}
// find first character that is not space or new line character
@@ -1238,10 +1229,6 @@ _Pragma("clang diagnostic pop") \
}
};
- if (WX_SYS_VERSION_LESS_THAN(@"8.0")) {
- // solve iOS7 memory problem
- context[@"nativeSet"] = [WXPolyfillSet class];
- }
context[@"console"][@"error"] = ^(){
[WXBridgeContext handleConsoleOutputWithArgument:[JSContext currentArguments] logLevel:WXLogFlagError];
};
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm
index 449b315..5283bda 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm
@@ -110,13 +110,8 @@
- (void)executeJSFramework:(NSString *)frameworkScript
{
-
WXAssertParam(frameworkScript);
- if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
- [_jsContext evaluateScript:frameworkScript withSourceURL:[NSURL URLWithString:@"weex-main-jsfm.js"]];
- }else{
- [_jsContext evaluateScript:frameworkScript];
- }
+ [_jsContext evaluateScript:frameworkScript withSourceURL:[NSURL URLWithString:@"weex-main-jsfm.js"]];
}
- (JSValue *)callJSMethod:(NSString *)method args:(NSArray *)args
@@ -423,9 +418,7 @@
__weak typeof(self) weakSelf = self;
_jsContext = [[JSContext alloc] init];
- if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
- _jsContext.name = @"Weex Context";
- }
+ _jsContext.name = @"Weex Context";
[WXBridgeContext mountContextEnvironment:_jsContext];
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
index ffb18bc..2f05067 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
@@ -112,10 +112,7 @@
- (BOOL)greater8SysVer
{
- //return NO;
- NSString *reqSysVer = @"8.0";
- NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
- return [currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending;
+ return YES;
}
- (void)observeValueForKeyPath:(NSString *)keyPath
diff --git a/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m b/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m
index 4d0a8b8..477e9bb 100644
--- a/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m
+++ b/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m
@@ -48,65 +48,22 @@ typedef void(^OperationBlock)(void);
//reduced pop/push animation in iOS 7
- (UIViewController *)popViewControllerAnimated:(BOOL)animated
{
- if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
- return [super popViewControllerAnimated:animated];
-
- __weak typeof(self) weakSelf = self;
- [self addOperationBlock:^{
- if ([self.viewControllers count] > 0 ) {
- UIViewController *viewController = [super popViewControllerAnimated:NO];
- if (!viewController) {
- weakSelf.operationInProcess = NO;
- }
- }
- }];
-
- return nil;
+ return [super popViewControllerAnimated:animated];
}
- (NSArray<UIViewController *> *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated
{
- if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
- return [super popToViewController:viewController animated:animated];
-
- __weak typeof(self) weakSelf = self;
- [self addOperationBlock:^{
- if ([weakSelf.viewControllers containsObject:viewController]) {
- NSArray *viewControllers = [super popToViewController:viewController animated:NO];
- if (viewControllers.count == 0) {
- weakSelf.operationInProcess = NO;
- }
- } else {
- weakSelf.operationInProcess = NO;
- }
- }];
-
- return nil;
+ return [super popToViewController:viewController animated:animated];
}
- (NSArray<UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated
{
- if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
- return [super popToRootViewControllerAnimated:animated];
-
- __weak typeof(self) weakSelf = self;
- [self addOperationBlock:^{
- NSArray *viewControllers = [super popToRootViewControllerAnimated:NO];
- if (viewControllers.count == 0) {
- weakSelf.operationInProcess = NO;
- }
- }];
- return nil;
+ return [super popToRootViewControllerAnimated:animated];
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
- if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
- return [super pushViewController:viewController animated:animated];
-
- [self addOperationBlock:^{
- [super pushViewController:viewController animated:NO];
- }];
+ return [super pushViewController:viewController animated:animated];
}
- (void)addOperationBlock:(OperationBlock)operation
diff --git a/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m b/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m
index bbf2590..0f163d5 100644
--- a/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m
+++ b/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m
@@ -1010,15 +1010,13 @@ if ([removeEventName isEqualToString:@#eventName1]||[removeEventName isEqualToSt
NSDictionary *resultTouch = [_component touchResultWithScreenLocation:screenLocation pageLocation:pageLocation identifier:touch.wx_identifier];
NSMutableDictionary * mutableResultTouch = [resultTouch mutableCopy];
- if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0")) {
- float value = touch.force*60;
- float maxValue = touch.maximumPossibleForce*60;
- if (touch.maximumPossibleForce) {
- // the forece value will be range 1 from 0.
- [mutableResultTouch setObject:[NSNumber numberWithFloat:value/maxValue] forKey:@"force"];
- }else {
- [mutableResultTouch setObject:[NSNumber numberWithFloat:0.0] forKey:@"force"];
- }
+ float value = touch.force*60;
+ float maxValue = touch.maximumPossibleForce*60;
+ if (touch.maximumPossibleForce) {
+ // the forece value will be range 1 from 0.
+ [mutableResultTouch setObject:[NSNumber numberWithFloat:value/maxValue] forKey:@"force"];
+ }else {
+ [mutableResultTouch setObject:[NSNumber numberWithFloat:0.0] forKey:@"force"];
}
if (mutableResultTouch) { // component is nil, mutableResultTouch will be nil
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
index f70e6fb..9b5cfae 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
@@ -101,12 +101,7 @@ static NSThread *WXBackupBridgeThread;
dispatch_once(&onceToken, ^{
WXBridgeThread = [[NSThread alloc] initWithTarget:[[self class]sharedManager] selector:@selector(_runLoopThread) object:nil];
[WXBridgeThread setName:WX_BRIDGE_THREAD_NAME];
- if(WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
- [WXBridgeThread setQualityOfService:[[NSThread mainThread] qualityOfService]];
- } else {
- [WXBridgeThread setThreadPriority:[[NSThread mainThread] threadPriority]];
- }
-
+ [WXBridgeThread setQualityOfService:[[NSThread mainThread] qualityOfService]];
[WXBridgeThread start];
});
@@ -119,12 +114,7 @@ static NSThread *WXBackupBridgeThread;
dispatch_once(&onceToken, ^{
WXBackupBridgeThread = [[NSThread alloc] initWithTarget:[[self class]sharedManager] selector:@selector(_runLoopThread) object:nil];
[WXBackupBridgeThread setName:WX_BACKUP_BRIDGE_THREAD_NAME];
- if(WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
- [WXBackupBridgeThread setQualityOfService:[[NSThread mainThread] qualityOfService]];
- } else {
- [WXBackupBridgeThread setThreadPriority:[[NSThread mainThread] threadPriority]];
- }
-
+ [WXBackupBridgeThread setQualityOfService:[[NSThread mainThread] qualityOfService]];
[WXBackupBridgeThread start];
});
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
index 58c26b0..eaea659 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
@@ -159,12 +159,7 @@ static NSThread *WXComponentThread;
dispatch_once(&onceToken, ^{
WXComponentThread = [[NSThread alloc] initWithTarget:[self sharedManager] selector:@selector(_runLoopThread) object:nil];
[WXComponentThread setName:WX_COMPONENT_THREAD_NAME];
- if(WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
- [WXComponentThread setQualityOfService:[[NSThread mainThread] qualityOfService]];
- } else {
- [WXComponentThread setThreadPriority:[[NSThread mainThread] threadPriority]];
- }
-
+ [WXComponentThread setQualityOfService:[[NSThread mainThread] qualityOfService]];
[WXComponentThread start];
});
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
index d9c92db..ec4194b 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
@@ -261,12 +261,6 @@ static BOOL bNeedRemoveEvents = YES;
[_panGesture removeTarget:nil action:NULL];
}
- if (bNeedRemoveEvents) {
- if (WX_SYS_VERSION_LESS_THAN(@"9.0")) {
- [self _removeAllEvents];
- }
- }
-
if (_bindingExpressions != nullptr) {
for (WXJSExpression* expr : *_bindingExpressions) {
if (expr != nullptr) {
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m b/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
index ca12b33..6354e69 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
@@ -94,12 +94,6 @@ WX_EXPORT_METHOD(@selector(prompt:callback:))
- (void)dealloc
{
- if (WX_SYS_VERSION_LESS_THAN(@"8.0")) {
- for (UIAlertView *alerView in _alertViews) {
- alerView.delegate = nil;
- }
- }
-
[_alertViews removeAllObjects];
}
diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXConvert.m b/ios/sdk/WeexSDK/Sources/Utility/WXConvert.m
index bdfb127..befe205 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXConvert.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXConvert.m
@@ -552,31 +552,31 @@ WX_NUMBER_CONVERT(NSUInteger, unsignedIntegerValue)
{
NSString *string = [WXConvert NSString:value];
if (!string)
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0:UIFontWeightRegular;
+ return UIFontWeightRegular;
else if ([string isEqualToString:@"normal"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0:UIFontWeightRegular;
+ return UIFontWeightRegular;
else if ([string isEqualToString:@"bold"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0.4:UIFontWeightBold;
+ return UIFontWeightBold;
else if ([string isEqualToString:@"100"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?-0.8:UIFontWeightUltraLight;
+ return UIFontWeightUltraLight;
else if ([string isEqualToString:@"200"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?-0.6:UIFontWeightThin;
+ return UIFontWeightThin;
else if ([string isEqualToString:@"300"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?-0.4:UIFontWeightLight;
+ return UIFontWeightLight;
else if ([string isEqualToString:@"400"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0:UIFontWeightRegular;
+ return UIFontWeightRegular;
else if ([string isEqualToString:@"500"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0.23:UIFontWeightMedium;
+ return UIFontWeightMedium;
else if ([string isEqualToString:@"600"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0.3:UIFontWeightSemibold;
+ return UIFontWeightSemibold;
else if ([string isEqualToString:@"700"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0.4:UIFontWeightBold;
+ return UIFontWeightBold;
else if ([string isEqualToString:@"800"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0.56:UIFontWeightHeavy;
+ return UIFontWeightHeavy;
else if ([string isEqualToString:@"900"])
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0.62:UIFontWeightBlack;
+ return UIFontWeightBlack;
- return WX_SYS_VERSION_LESS_THAN(@"8.2")?0:UIFontWeightRegular;
+ return UIFontWeightRegular;
}
+ (WXTextDecoration)WXTextDecoration:(id)value
diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
index e94c40e..28119f0 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
@@ -160,13 +160,7 @@ CGFloat WXFloorPixelValue(CGFloat value)
+ (WXLayoutDirection)getEnvLayoutDirection {
// We not use the below technique, because your app maybe not support the first preferredLanguages
// _sysLayoutDirection = [NSLocale characterDirectionForLanguage:[[NSLocale preferredLanguages] objectAtIndex:0]] == NSLocaleLanguageDirectionRightToLeft ? WXLayoutDirectionRTL : WXLayoutDirectionLTR;
- if (@available(iOS 9.0, *)) {
- // The view is shown in right-to-left mode right now.
- return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:UISemanticContentAttributeUnspecified] == UIUserInterfaceLayoutDirectionRightToLeft ? WXLayoutDirectionRTL : WXLayoutDirectionLTR;
- } else {
- // Use the previous technique
- return [[UIApplication sharedApplication] userInterfaceLayoutDirection] == UIUserInterfaceLayoutDirectionRightToLeft ? WXLayoutDirectionRTL : WXLayoutDirectionLTR;
- }
+ return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:UISemanticContentAttributeUnspecified] == UIUserInterfaceLayoutDirectionRightToLeft ? WXLayoutDirectionRTL : WXLayoutDirectionLTR;
}
+ (NSDictionary *)getEnvironment
@@ -583,22 +577,14 @@ CGFloat WXFloorPixelValue(CGFloat value)
if (fontFamily) {
WXLogWarning(@"Unknown fontFamily:%@", fontFamily);
}
- if(WX_SYS_VERSION_LESS_THAN(@"8.2")) {
- font = [UIFont systemFontOfSize:fontSize];
- } else {
- font = [UIFont systemFontOfSize:fontSize weight:textWeight];
- }
+ font = [UIFont systemFontOfSize:fontSize weight:textWeight];
}
}
UIFontDescriptor *fontD = font.fontDescriptor;
UIFontDescriptorSymbolicTraits traits = 0;
traits = (textStyle == WXTextStyleItalic) ? (traits | UIFontDescriptorTraitItalic) : traits;
- if (WX_SYS_VERSION_LESS_THAN(@"8.2")) {
- traits = ((textWeight-0.4) >= 0.0) ? (traits | UIFontDescriptorTraitBold) : traits;
- }else {
- traits = (textWeight-UIFontWeightBold >= 0.0) ? (traits | UIFontDescriptorTraitBold) : traits;
- }
+ traits = (textWeight-UIFontWeightBold >= 0.0) ? (traits | UIFontDescriptorTraitBold) : traits;
if (traits != 0) {
fontD = [fontD fontDescriptorWithSymbolicTraits:traits];
UIFont *tempFont = [UIFont fontWithDescriptor:fontD size:0];