Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit cdda290

Browse files
Merge pull request #334 from wordpress-mobile/feature/update_to_ios11_as_mininum
Feature/update to ios11 as mininum
2 parents 8cc665c + 11b1fb7 commit cdda290

File tree

15 files changed

+78
-90
lines changed

15 files changed

+78
-90
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
33
`WPMediaPicker` adheres to [Semantic Versioning](http://semver.org/).
44

55
#### Releases
6+
- `1.5.0` Release - [1.5](#1.5.0)
67
- `1.4.2` Release - [1.4](#1.4.2)
78
- `1.4` Release - [1.4](#1.4)
89
- `1.3.4` Release - [1.3.4](#1.3.4)
@@ -25,6 +26,13 @@ All notable changes to this project will be documented in this file.
2526
- `0.16` Releases - [0.16](#16)
2627
- `0.15` Releases - [0.15](#15)
2728

29+
---
30+
## [1.5.0](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.5.0)
31+
Released on 2019-09-09. All issues associated with this milestone can be found using this [filter](https://github.com/wordpress-mobile/MediaPicker-iOS/pulls?utf8=✓&q=is%3Apr%20is%3Aclosed%20milestone%3A1.5.0).
32+
33+
### Changes
34+
- Update code to have as minimum working version iOS 11.
35+
2836
---
2937
## [1.4.2](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.4.2)
3038
Released on 2019-06-14. All issues associated with this milestone can be found using this [filter](https://github.com/wordpress-mobile/MediaPicker-iOS/pulls?utf8=✓&q=is%3Apr%20is%3Aclosed%20milestone%3A1.4.2).

Example/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source 'https://github.com/CocoaPods/Specs.git'
2-
platform :ios, '10.0'
2+
platform :ios, '11.0'
33
target 'WPMediaPicker' do
44
pod "WPMediaPicker", :path => "../"
55

Example/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- WPMediaPicker (1.4.2)
2+
- WPMediaPicker (1.5.0)
33

44
DEPENDENCIES:
55
- WPMediaPicker (from `../`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
99
:path: "../"
1010

1111
SPEC CHECKSUMS:
12-
WPMediaPicker: 1897f312c7b41114ffd239fb782431ae602134a1
12+
WPMediaPicker: 3f03b6deeb4d2360679b65c3b33d5c470c822bce
1313

14-
PODFILE CHECKSUM: 7c47e10b39aca62b1f30c3c4260cc99456cf95f8
14+
PODFILE CHECKSUM: 02a24c94627582ae16b486b76dc047a7f773dcc4
1515

1616
COCOAPODS: 1.6.1

Example/WPMediaPicker.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
480480
GCC_WARN_UNUSED_FUNCTION = YES;
481481
GCC_WARN_UNUSED_VARIABLE = YES;
482-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
482+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
483483
ONLY_ACTIVE_ARCH = YES;
484484
SDKROOT = iphoneos;
485485
TARGETED_DEVICE_FAMILY = "1,2";
@@ -526,7 +526,7 @@
526526
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
527527
GCC_WARN_UNUSED_FUNCTION = YES;
528528
GCC_WARN_UNUSED_VARIABLE = YES;
529-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
529+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
530530
SDKROOT = iphoneos;
531531
TARGETED_DEVICE_FAMILY = "1,2";
532532
VALIDATE_PRODUCT = YES;
@@ -548,6 +548,7 @@
548548
GCC_PRECOMPILE_PREFIX_HEADER = YES;
549549
GCC_PREFIX_HEADER = "WPMediaPicker/WPMediaPicker-Prefix.pch";
550550
INFOPLIST_FILE = "WPMediaPicker/WPMediaPicker-Info.plist";
551+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
551552
PRODUCT_BUNDLE_IDENTIFIER = "org.wordpress.$(PRODUCT_NAME:rfc1034identifier)";
552553
PRODUCT_NAME = "$(TARGET_NAME)";
553554
PROVISIONING_PROFILE = "";
@@ -573,6 +574,7 @@
573574
GCC_PRECOMPILE_PREFIX_HEADER = YES;
574575
GCC_PREFIX_HEADER = "WPMediaPicker/WPMediaPicker-Prefix.pch";
575576
INFOPLIST_FILE = "WPMediaPicker/WPMediaPicker-Info.plist";
577+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
576578
PRODUCT_BUNDLE_IDENTIFIER = "org.wordpress.$(PRODUCT_NAME:rfc1034identifier)";
577579
PRODUCT_NAME = "$(TARGET_NAME)";
578580
PROVISIONING_PROFILE = "";

Example/WPMediaPicker.xcodeproj/xcshareddata/xcschemes/WPMediaPicker-Example.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1030"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Example/WPMediaPicker/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,15 @@
172172
"size" : "44x44",
173173
"idiom" : "watch",
174174
"scale" : "2x",
175-
"role" : "longLook",
176-
"subtype" : "42mm"
175+
"role" : "appLauncher",
176+
"subtype" : "40mm"
177+
},
178+
{
179+
"size" : "50x50",
180+
"idiom" : "watch",
181+
"scale" : "2x",
182+
"role" : "appLauncher",
183+
"subtype" : "44mm"
177184
},
178185
{
179186
"size" : "86x86",
@@ -189,10 +196,24 @@
189196
"role" : "quickLook",
190197
"subtype" : "42mm"
191198
},
199+
{
200+
"size" : "108x108",
201+
"idiom" : "watch",
202+
"scale" : "2x",
203+
"role" : "quickLook",
204+
"subtype" : "44mm"
205+
},
192206
{
193207
"idiom" : "watch-marketing",
194208
"size" : "1024x1024",
195209
"scale" : "1x"
210+
},
211+
{
212+
"size" : "44x44",
213+
"idiom" : "watch",
214+
"scale" : "2x",
215+
"role" : "longLook",
216+
"subtype" : "42mm"
196217
}
197218
],
198219
"info" : {

Pod/Classes/WPAssetViewController.m

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ - (void)viewDidLoad
3636
self.imageView.translatesAutoresizingMaskIntoConstraints = NO;
3737
[self.imageView.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = YES;
3838
[self.imageView.widthAnchor constraintEqualToAnchor:self.view.widthAnchor].active = YES;
39-
[self.imageView.topAnchor constraintEqualToAnchor:self.topLayoutGuide.bottomAnchor].active = YES;
40-
[self.imageView.bottomAnchor constraintEqualToAnchor:self.bottomLayoutGuide.topAnchor].active = YES;
39+
[self.imageView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
40+
[self.imageView.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor].active = YES;
4141

4242
[self.view addSubview:self.videoView];
4343
self.videoView.translatesAutoresizingMaskIntoConstraints = NO;
4444
[self.videoView.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = YES;
4545
[self.videoView.widthAnchor constraintEqualToAnchor:self.view.widthAnchor].active = YES;
46-
[self.videoView.topAnchor constraintEqualToAnchor:self.topLayoutGuide.bottomAnchor].active = YES;
47-
[self.videoView.bottomAnchor constraintEqualToAnchor:self.bottomLayoutGuide.topAnchor].active = YES;
46+
[self.videoView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
47+
[self.videoView.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor].active = YES;
4848
self.videoView.delegate = self;
4949

5050
[self.view addSubview:self.activityIndicatorView];
@@ -109,9 +109,8 @@ - (UIImageView *)imageView
109109
_imageView.backgroundColor = [UIColor blackColor];
110110
_imageView.userInteractionEnabled = YES;
111111
[_imageView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapOnAsset:)]];
112-
if (@available(iOS 11.0, *)) {
113-
_imageView.accessibilityIgnoresInvertColors = YES;
114-
}
112+
_imageView.accessibilityIgnoresInvertColors = YES;
113+
115114
return _imageView;
116115
}
117116

@@ -228,10 +227,7 @@ - (void)handleTapOnAsset:(UIGestureRecognizer *)gestureRecognizer
228227
__weak __typeof(self) weakSelf = self;
229228
[self.videoView setControlToolbarHidden:hidden animated:YES completion:^{
230229
[weakSelf setNeedsStatusBarAppearanceUpdate];
231-
232-
if (@available(iOS 11.0, *)) {
233-
[weakSelf setNeedsUpdateOfHomeIndicatorAutoHidden];
234-
}
230+
[weakSelf setNeedsUpdateOfHomeIndicatorAutoHidden];
235231
}];
236232
}
237233
}

Pod/Classes/WPInputMediaPickerViewController.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,8 @@ - (void)setupMediaPickerViewController {
5454
self.mediaPicker.view.translatesAutoresizingMaskIntoConstraints = NO;
5555
[self.view addSubview:self.mediaPicker.view];
5656

57-
NSLayoutAnchor *leadingAnchor = self.view.leadingAnchor;
58-
NSLayoutAnchor *trailingAnchor = self.view.trailingAnchor;
59-
60-
if (@available(iOS 11.0, *)) {
61-
leadingAnchor = self.view.safeAreaLayoutGuide.leadingAnchor;
62-
trailingAnchor = self.view.safeAreaLayoutGuide.trailingAnchor;
63-
}
57+
NSLayoutAnchor *leadingAnchor = self.view.safeAreaLayoutGuide.leadingAnchor;
58+
NSLayoutAnchor *trailingAnchor = self.view.safeAreaLayoutGuide.trailingAnchor;
6459

6560
[NSLayoutConstraint activateConstraints:
6661
@[

Pod/Classes/WPMediaCollectionViewCell.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ - (void)commonInit
8181
_imageView.contentMode = UIViewContentModeScaleAspectFill;
8282
_imageView.clipsToBounds = YES;
8383
_imageView.backgroundColor = self.backgroundColor;
84-
if (@available(iOS 11.0, *)) {
85-
_imageView.accessibilityIgnoresInvertColors = YES;
86-
}
84+
_imageView.accessibilityIgnoresInvertColors = YES;
85+
8786
self.backgroundView = _imageView;
8887

8988
_selectionFrame = [[UIView alloc] initWithFrame:self.backgroundView.frame];

Pod/Classes/WPMediaGroupTableViewCell.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSStr
2121
_imagePosterView.clipsToBounds = YES;
2222
_imagePosterView.translatesAutoresizingMaskIntoConstraints = NO;
2323
_imagePosterView.backgroundColor = _posterBackgroundColor;
24-
if (@available(iOS 11.0, *)) {
25-
_imagePosterView.accessibilityIgnoresInvertColors = YES;
26-
}
24+
_imagePosterView.accessibilityIgnoresInvertColors = YES;
25+
2726
[self.contentView addSubview:_imagePosterView];
2827

2928
_titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];

0 commit comments

Comments
 (0)