From 52f866b85d4516b5a2e39b6f18607d201df77560 Mon Sep 17 00:00:00 2001 From: Relisiuol <49282232+relisiuol@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:14:23 +0200 Subject: [PATCH 1/6] Update FLAnimatedImageView+WebCache.h --- .../FLAnimatedImageBridge/FLAnimatedImageView+WebCache.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/FLAnimatedImageView+WebCache.h b/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/FLAnimatedImageView+WebCache.h index a139eaf..177d37f 100644 --- a/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/FLAnimatedImageView+WebCache.h +++ b/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/FLAnimatedImageView+WebCache.h @@ -6,8 +6,16 @@ * file that was distributed with this source code. */ +#if __has_include() #import +#else +@import SDWebImage; +#endif +#if __has_include() #import +#else +@import FLAnimatedImage; +#endif #import "SDFLAnimatedImage.h" /** From b2361ee7fe5220cb3b9f8b3abcbaf5bd7e80e14d Mon Sep 17 00:00:00 2001 From: Relisiuol <49282232+relisiuol@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:14:36 +0200 Subject: [PATCH 2/6] Update SDFLAnimatedImage.h --- .../Classes/FLAnimatedImageBridge/SDFLAnimatedImage.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/SDFLAnimatedImage.h b/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/SDFLAnimatedImage.h index b0bea95..a5a20ae 100644 --- a/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/SDFLAnimatedImage.h +++ b/SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/SDFLAnimatedImage.h @@ -6,8 +6,16 @@ * file that was distributed with this source code. */ -#import +#if __has_include() #import +#else +@import SDWebImage; +#endif +#if __has_include() +#import +#else +@import FLAnimatedImage; +#endif /** * Optimal frame cache size of FLAnimatedImage during initializer. (1.0.11 version later) From 4fb95f904e934eccd42c90aa1120b60c8a7d4cea Mon Sep 17 00:00:00 2001 From: Relisiuol <49282232+relisiuol@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:15:02 +0200 Subject: [PATCH 3/6] Update SDWebImageFLPlugin.h --- SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h b/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h index a486a59..eb1ec67 100644 --- a/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h +++ b/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h @@ -10,8 +10,16 @@ #endif #endif -#import -#import +#if __has_include() +#import +#else +@import SDWebImage; +#endif +#if __has_include() +#import +#else +@import FLAnimatedImage; +#endif FOUNDATION_EXPORT double SDWebImageFLPluginVersionNumber; From 0ceb0e6ae508fbf8c13fd1e03ed3b2eee2e4f0e9 Mon Sep 17 00:00:00 2001 From: Relisiuol <49282232+relisiuol@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:23:42 +0200 Subject: [PATCH 4/6] Create Package.swift --- Package.swift | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..8669bca --- /dev/null +++ b/Package.swift @@ -0,0 +1,39 @@ +// swift-tools-version:5.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "SDWebImageFLPlugin", + platforms: [ + .iOS(.v9), + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "SDWebImageFLPlugin", + targets: ["SDWebImageFLPlugin"] + ) + ], + dependencies: [ + .package( + url: "https://github.com/SDWebImage/SDWebImage.git", + from: "5.0.0" + ), + .package( + url: "https://github.com/FLAnimatedImage/FLAnimatedImage.git", + from: "1.0.11" + ) + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "SDWebImageFLPlugin", + dependencies: ["SDWebImage", "FLAnimatedImage"], + path: "SDWebImageFLPlugin", + sources: ["Classes/FLAnimatedImageBridge", "Modules/SDWebImageFLPlugin.h"], + publicHeadersPath: ["Modules"] + ) + ] +) From 0de8ebf7dfd509e241f9f78ebb1553f0ee8375ca Mon Sep 17 00:00:00 2001 From: Relisiuol <49282232+relisiuol@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:30:40 +0200 Subject: [PATCH 5/6] Update SDWebImageFLPlugin.h --- SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h b/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h index eb1ec67..364947c 100644 --- a/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h +++ b/SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h @@ -10,17 +10,8 @@ #endif #endif -#if __has_include() -#import -#else -@import SDWebImage; -#endif -#if __has_include() -#import -#else -@import FLAnimatedImage; -#endif - +#import +#import FOUNDATION_EXPORT double SDWebImageFLPluginVersionNumber; FOUNDATION_EXPORT const unsigned char SDWebImageFLPluginVersionString[]; From 77231627c952ba555ce79daefd505c9fbed13cb7 Mon Sep 17 00:00:00 2001 From: Relisiuol <49282232+relisiuol@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:47:32 +0200 Subject: [PATCH 6/6] Update Package.swift --- Package.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Package.swift b/Package.swift index 8669bca..625f557 100644 --- a/Package.swift +++ b/Package.swift @@ -18,10 +18,10 @@ let package = Package( dependencies: [ .package( url: "https://github.com/SDWebImage/SDWebImage.git", - from: "5.0.0" + from: "5.10.0" ), .package( - url: "https://github.com/FLAnimatedImage/FLAnimatedImage.git", + url: "https://github.com/Flipboard/FLAnimatedImage.git", from: "1.0.11" ) ], @@ -32,8 +32,11 @@ let package = Package( name: "SDWebImageFLPlugin", dependencies: ["SDWebImage", "FLAnimatedImage"], path: "SDWebImageFLPlugin", - sources: ["Classes/FLAnimatedImageBridge", "Modules/SDWebImageFLPlugin.h"], - publicHeadersPath: ["Modules"] + sources: ["Classes/FLAnimatedImageBridge"], + publicHeadersPath: "Modules", + cSettings: [ + .headerSearchPath("Modules") + ] ) ] )