From 49f4aea18c0ac834d6bd98c958cd813d7d4e5b56 Mon Sep 17 00:00:00 2001 From: Erasov Ivan Date: Fri, 15 Jan 2021 18:31:25 +0300 Subject: [PATCH 1/4] Modified to use resource bundles instead of resources --- AXPhotoViewer.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AXPhotoViewer.podspec b/AXPhotoViewer.podspec index 0eb98ff..36ac51d 100644 --- a/AXPhotoViewer.podspec +++ b/AXPhotoViewer.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "AXPhotoViewer" - s.version = "1.7.1" + s.version = "1.7.2" s.license = { :type => 'MIT', :file => 'LICENSE.md' } s.summary = "An iOS/tvOS photo gallery viewer, useful for viewing a large number of photos." s.homepage = "https://github.com/alexhillc/AXPhotoViewer" @@ -18,7 +18,7 @@ Pod::Spec.new do |s| cs.ios.dependency 'AXStateButton', '>= 1.1.3' cs.ios.dependency 'FLAnimatedImage', '>= 1.0.0' cs.tvos.dependency 'FLAnimatedImage-tvOS', '>= 1.0.16' - cs.resources = 'Assets/*.{xcassets}' + s.resource_bundle = { 'AXPhotoViewerResources' => ['Assets/*.{xcassets}'] } cs.source_files = 'Source/*.{swift,h,m}', 'Source/Classes/**/*.{swift,h,m}', 'Source/Protocols/*.{swift,h,m}', From f8f1ea4562bf7b1760d3cc4f4002bac603969c68 Mon Sep 17 00:00:00 2001 From: Erasov Ivan Date: Fri, 15 Jan 2021 18:37:29 +0300 Subject: [PATCH 2/4] Podspec typo --- AXPhotoViewer.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AXPhotoViewer.podspec b/AXPhotoViewer.podspec index 36ac51d..ec16394 100644 --- a/AXPhotoViewer.podspec +++ b/AXPhotoViewer.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |s| cs.ios.dependency 'AXStateButton', '>= 1.1.3' cs.ios.dependency 'FLAnimatedImage', '>= 1.0.0' cs.tvos.dependency 'FLAnimatedImage-tvOS', '>= 1.0.16' - s.resource_bundle = { 'AXPhotoViewerResources' => ['Assets/*.{xcassets}'] } + cs.resource_bundle = { 'AXPhotoViewerResources' => ['Assets/*.{xcassets}'] } cs.source_files = 'Source/*.{swift,h,m}', 'Source/Classes/**/*.{swift,h,m}', 'Source/Protocols/*.{swift,h,m}', From 810dcce48a86e62330229eb50a14898bd59bd3eb Mon Sep 17 00:00:00 2001 From: Erasov Ivan Date: Fri, 15 Jan 2021 19:55:01 +0300 Subject: [PATCH 3/4] Updated loading resources code --- Source/AXBundle.swift | 7 +++++++ Source/Classes/Views/AXLoadingView.swift | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/AXBundle.swift b/Source/AXBundle.swift index ef4abd2..ef05165 100644 --- a/Source/AXBundle.swift +++ b/Source/AXBundle.swift @@ -11,4 +11,11 @@ struct AXBundle { return Bundle(for: AXPhotosViewController.self) } + static var resourcesBundle: Bundle? { + + let bundle = AXBundle.frameworkBundle + guard let path = bundle.path(forResource: "AXPhotoViewerResources", ofType: "bundle") else { return nil } + + return Bundle(path: path) + } } diff --git a/Source/Classes/Views/AXLoadingView.swift b/Source/Classes/Views/AXLoadingView.swift index 2b97ef4..42b0632 100644 --- a/Source/Classes/Views/AXLoadingView.swift +++ b/Source/Classes/Views/AXLoadingView.swift @@ -51,7 +51,7 @@ /// The image to show in the `errorImageView` when displaying an error. @objc open var errorImage: UIImage? { get { - return UIImage(named: "axphotoviewer-error", in: AXBundle.frameworkBundle, compatibleWith: nil) + return UIImage(named: "axphotoviewer-error", in: AXBundle.resourcesBundle, compatibleWith: nil) } } From 34bda7948cb12b7ba35f546c76106cc3b6d3b153 Mon Sep 17 00:00:00 2001 From: Erasov Ivan Date: Mon, 8 Feb 2021 23:50:41 +0300 Subject: [PATCH 4/4] Updated FLAnimatedImage module import to latest version --- Source/Extensions/FLAnimatedImageView+AXExtensions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Extensions/FLAnimatedImageView+AXExtensions.h b/Source/Extensions/FLAnimatedImageView+AXExtensions.h index ac083de..9fc7b1d 100644 --- a/Source/Extensions/FLAnimatedImageView+AXExtensions.h +++ b/Source/Extensions/FLAnimatedImageView+AXExtensions.h @@ -7,9 +7,9 @@ // #if TARGET_OS_IOS -@import FLAnimatedImage.FLAnimatedImageView; +@import FLAnimatedImage; #elif TARGET_OS_TV -@import FLAnimatedImage_tvOS.FLAnimatedImageView; +@import FLAnimatedImage_tvOS; #endif @interface FLAnimatedImageView (AXExtensions)