From b426835a2129cfe6342e46e8d638a6dabfb15524 Mon Sep 17 00:00:00 2001 From: giomfo Date: Thu, 17 Dec 2015 21:52:37 +0100 Subject: [PATCH] Project update: Upgrade IPHONEOS_DEPLOYMENT_TARGET: iOS 8.0 --- Vector.xcodeproj/project.pbxproj | 8 ++++---- Vector/AppDelegate.m | 13 +++---------- .../Categories/MXKRoomBubbleTableViewCell+Vector.m | 13 ++----------- Vector/ViewController/MediaPickerViewController.m | 10 ++-------- 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/Vector.xcodeproj/project.pbxproj b/Vector.xcodeproj/project.pbxproj index 0d72993c0..44a906fda 100644 --- a/Vector.xcodeproj/project.pbxproj +++ b/Vector.xcodeproj/project.pbxproj @@ -1180,7 +1180,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1216,7 +1216,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1231,7 +1231,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; INFOPLIST_FILE = Vector/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1245,7 +1245,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; INFOPLIST_FILE = Vector/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Vector/AppDelegate.m b/Vector/AppDelegate.m index 3eae2f347..600fa96ce 100644 --- a/Vector/AppDelegate.m +++ b/Vector/AppDelegate.m @@ -475,16 +475,9 @@ { if (!isAPNSRegistered) { - if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) - { - // Registration on iOS 8 and later - UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound |UIUserNotificationTypeAlert) categories:nil]; - [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; - } - else - { - [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationType)(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeBadge)]; - } + // Registration on iOS 8 and later + UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound |UIUserNotificationTypeAlert) categories:nil]; + [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; } } diff --git a/Vector/Categories/MXKRoomBubbleTableViewCell+Vector.m b/Vector/Categories/MXKRoomBubbleTableViewCell+Vector.m index dd711d4e4..0b5c361af 100644 --- a/Vector/Categories/MXKRoomBubbleTableViewCell+Vector.m +++ b/Vector/Categories/MXKRoomBubbleTableViewCell+Vector.m @@ -87,17 +87,8 @@ multiplier:1.0 constant:15]; - if ([NSLayoutConstraint respondsToSelector:@selector(activateConstraints:)]) - { - [NSLayoutConstraint activateConstraints:@[leftConstraint, rightConstraint, topConstraint, heightConstraint]]; - } - else - { - [self.bubbleInfoContainer addConstraint:leftConstraint]; - [self.bubbleInfoContainer addConstraint:rightConstraint]; - [self.bubbleInfoContainer addConstraint:topConstraint]; - [dateTimeLabel addConstraint:heightConstraint]; - } + // Available on iOS 8 and later + [NSLayoutConstraint activateConstraints:@[leftConstraint, rightConstraint, topConstraint, heightConstraint]]; } } diff --git a/Vector/ViewController/MediaPickerViewController.m b/Vector/ViewController/MediaPickerViewController.m index 7345e487b..1cda89a9d 100644 --- a/Vector/ViewController/MediaPickerViewController.m +++ b/Vector/ViewController/MediaPickerViewController.m @@ -731,14 +731,8 @@ NSString* const recentItemCollectionViewCellId = @"recentItemCollectionViewCellI AVCaptureConnection *connection = [movieFileOutput connectionWithMediaType:AVMediaTypeVideo]; if ([connection isVideoStabilizationSupported]) { - if ([connection respondsToSelector:@selector(setPreferredVideoStabilizationMode:)]) - { - [connection setPreferredVideoStabilizationMode:YES]; - } - else - { - [connection setEnablesVideoStabilizationWhenAvailable:YES]; - } + // Available on iOS 8 and later + [connection setPreferredVideoStabilizationMode:YES]; } } [movieFileOutput addObserver:self forKeyPath:@"recording" options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:RecordingContext];