From a503785e54cc02fe44d36caf1fd74d0add1babd6 Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 16:18:16 -0400 Subject: [PATCH 1/2] reinsert the missing check for nil --- NYTPhotoViewer/NYTPhotosViewController.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/NYTPhotoViewer/NYTPhotosViewController.m b/NYTPhotoViewer/NYTPhotosViewController.m index e0dabdd1..1c46787a 100644 --- a/NYTPhotoViewer/NYTPhotosViewController.m +++ b/NYTPhotoViewer/NYTPhotosViewController.m @@ -526,12 +526,11 @@ - (NYTPhotoViewController *)newPhotoViewControllerForPhoto:(id )photo - (UIViewController *)newViewControllerAtIndex:(NSUInteger)index { if ([self.delegate respondsToSelector:@selector(photosViewController:interstitialViewAtIndex:)]) { UIView *view = [self.delegate photosViewController:self interstitialViewAtIndex:index]; - - NYTInterstitialViewController *interstitialViewController = [[NYTInterstitialViewController alloc] initWithView:view itemIndex:index]; - - return interstitialViewController; + if (view != nil) { + NYTInterstitialViewController *interstitialViewController = [[NYTInterstitialViewController alloc] initWithView:view itemIndex:index]; + return interstitialViewController; + } } - return nil; } From 759f256e3a5d0f5e7fb2870391da8031acb6b393 Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 16:57:29 -0400 Subject: [PATCH 2/2] bump to 5.0.1 --- CHANGELOG.md | 6 ++++++ Documentation/Release Process.md | 2 +- NYTPhotoViewer.podspec | 2 +- NYTPhotoViewer/Info.plist | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56ef3dba..f9f79628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Changes for users of the library currently on `develop`: +## [5.0.1](https://github.com/nytimes/NYTPhotoViewer/releases/tag/5.0.0) + +Changes for users of the library in 5.0.1: + +- bugfix: we weren't treating a nil interstitial correctly. + ## [5.0.0](https://github.com/nytimes/NYTPhotoViewer/releases/tag/5.0.0) Changes for users of the library in 5.0.0: diff --git a/Documentation/Release Process.md b/Documentation/Release Process.md index 4f3c9dc9..62df9f4c 100644 --- a/Documentation/Release Process.md +++ b/Documentation/Release Process.md @@ -3,7 +3,7 @@ _While tagging a new version of a library and pushing it to CocoaPods is concept # NYTPhotoViewer Release Process - Review [the diff between `master` and `develop`](https://github.com/NYTimes/NYTPhotoViewer/compare/master...develop) to determine which part of the version number to increment, in accordance with [semantic versioning](http://semver.org/). -- Update [the Podspec](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/NYTPhotoViewer.podspec) and the framework targets in [the Xcode project](https://github.com/NYTimes/NYTPhotoViewer/tree/develop/NYTPhotoViewer.xcodeproj) to the new version number. +- Update [the Podspec](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/NYTPhotoViewer.podspec) and the CFBundleShortVersionString in [Info.plist](https://github.com/NYTimes/NYTPhotoViewer/tree/develop/NYTPhotoViewer/Info.plist) to the new version number. - Make this change via a pull request to trigger notifications for those who watch the repository. - Using [the diff](https://github.com/NYTimes/NYTPhotoViewer/compare/master...develop), [the commit history](https://github.com/NYTimes/NYTPhotoViewer/commits/develop), and any notes about `develop` which may have been written in the `CHANGELOG`, update [`CHANGELOG.md`](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/CHANGELOG.md) with changes in the new version which may affect library users. - When reviewing the commit history, searching for “Merge pull request” helps find changes which should appear in [the `CHANGELOG`](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/CHANGELOG.md). diff --git a/NYTPhotoViewer.podspec b/NYTPhotoViewer.podspec index 809b07eb..1e1928f8 100644 --- a/NYTPhotoViewer.podspec +++ b/NYTPhotoViewer.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "NYTPhotoViewer" - s.version = "5.0.0" + s.version = "5.0.1" s.description = <<-DESC NYTPhotoViewer is a slideshow and image viewer that includes double tap to zoom, captions, support for multiple images, interactive flick to dismiss, animated zooming presentation, and more. diff --git a/NYTPhotoViewer/Info.plist b/NYTPhotoViewer/Info.plist index e6771905..881962ab 100644 --- a/NYTPhotoViewer/Info.plist +++ b/NYTPhotoViewer/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.0.0 + 5.0.1 CFBundleSignature ???? CFBundleVersion