From afb19b54eb3093baf3e507f67ec734c9249ada57 Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Fri, 26 Jan 2024 11:00:50 +0100 Subject: [PATCH 1/3] Correct use of imports for internal headers --- Sources/TwitterImagePipeline/TIP_ProjectCommon.h | 2 +- .../TwitterImagePipeline/include/TIPImageCodecCatalogue.h | 2 +- Sources/TwitterImagePipeline/include/TIPImageCodecs.h | 2 +- Sources/TwitterImagePipeline/include/TIPImageContainer.h | 2 +- .../TwitterImagePipeline/include/TIPImageFetchDelegate.h | 4 ++-- .../TwitterImagePipeline/include/TIPImageFetchMetrics.h | 4 ++-- .../TwitterImagePipeline/include/TIPImageFetchOperation.h | 8 ++++---- .../include/TIPImageFetchProgressiveLoadingPolicies.h | 2 +- .../TwitterImagePipeline/include/TIPImageFetchRequest.h | 4 ++-- Sources/TwitterImagePipeline/include/TIPImageUtils.h | 2 +- .../include/TIPImageViewFetchHelper.h | 4 ++-- Sources/TwitterImagePipeline/include/TIPProgressive.h | 2 +- .../TwitterImagePipeline/include/UIImage+TIPAdditions.h | 4 ++-- .../include/UIView+TIPImageFetchable.h | 2 +- .../TwitterImagePipelineMP4Codec/include/TIPXMP4Codec.h | 2 +- .../TwitterImagePipelineWebPCodec/include/TIPXWebPCodec.h | 2 +- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Sources/TwitterImagePipeline/TIP_ProjectCommon.h b/Sources/TwitterImagePipeline/TIP_ProjectCommon.h index 496d373..7c0854a 100644 --- a/Sources/TwitterImagePipeline/TIP_ProjectCommon.h +++ b/Sources/TwitterImagePipeline/TIP_ProjectCommon.h @@ -11,7 +11,7 @@ #import -#import +#import "TIPLogger.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/TwitterImagePipeline/include/TIPImageCodecCatalogue.h b/Sources/TwitterImagePipeline/include/TIPImageCodecCatalogue.h index 0231f2a..c772850 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageCodecCatalogue.h +++ b/Sources/TwitterImagePipeline/include/TIPImageCodecCatalogue.h @@ -7,7 +7,7 @@ // #import -#import +#import "TIPImageCodecs.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/TwitterImagePipeline/include/TIPImageCodecs.h b/Sources/TwitterImagePipeline/include/TIPImageCodecs.h index 5ee3e0b..a0fb989 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageCodecs.h +++ b/Sources/TwitterImagePipeline/include/TIPImageCodecs.h @@ -8,7 +8,7 @@ #import #import -#import +#import "TIPImageTypes.h" #import // UIViewContentMode @protocol TIPImageEncoder; diff --git a/Sources/TwitterImagePipeline/include/TIPImageContainer.h b/Sources/TwitterImagePipeline/include/TIPImageContainer.h index 788e35f..67e4520 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageContainer.h +++ b/Sources/TwitterImagePipeline/include/TIPImageContainer.h @@ -7,7 +7,7 @@ // #import -#import +#import "TIPImageUtils.h" #import #import diff --git a/Sources/TwitterImagePipeline/include/TIPImageFetchDelegate.h b/Sources/TwitterImagePipeline/include/TIPImageFetchDelegate.h index be13a88..11c6737 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageFetchDelegate.h +++ b/Sources/TwitterImagePipeline/include/TIPImageFetchDelegate.h @@ -6,8 +6,8 @@ // Copyright (c) 2015 Twitter. All rights reserved. // -#import -#import +#import "TIPDefinitions.h" +#import "TIPImageUtils.h" #import #import diff --git a/Sources/TwitterImagePipeline/include/TIPImageFetchMetrics.h b/Sources/TwitterImagePipeline/include/TIPImageFetchMetrics.h index f24d027..3a347a5 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageFetchMetrics.h +++ b/Sources/TwitterImagePipeline/include/TIPImageFetchMetrics.h @@ -8,8 +8,8 @@ #import -#import -#import +#import "TIPDefinitions.h" +#import "TIPImageFetchOperation.h" @class TIPImageFetchMetricInfo; diff --git a/Sources/TwitterImagePipeline/include/TIPImageFetchOperation.h b/Sources/TwitterImagePipeline/include/TIPImageFetchOperation.h index f0af311..73a388b 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageFetchOperation.h +++ b/Sources/TwitterImagePipeline/include/TIPImageFetchOperation.h @@ -6,10 +6,10 @@ // Copyright (c) 2015 Twitter. All rights reserved. // -#import -#import -#import -#import +#import "TIPDefinitions.h" +#import "TIPImageContainer.h" +#import "TIPImageUtils.h" +#import "TIPSafeOperation.h" #import @class TIPImagePipeline; diff --git a/Sources/TwitterImagePipeline/include/TIPImageFetchProgressiveLoadingPolicies.h b/Sources/TwitterImagePipeline/include/TIPImageFetchProgressiveLoadingPolicies.h index 870a0d1..9c9f752 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageFetchProgressiveLoadingPolicies.h +++ b/Sources/TwitterImagePipeline/include/TIPImageFetchProgressiveLoadingPolicies.h @@ -6,7 +6,7 @@ // Copyright (c) 2015 Twitter. All rights reserved. // -#import +#import "TIPProgressive.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/TwitterImagePipeline/include/TIPImageFetchRequest.h b/Sources/TwitterImagePipeline/include/TIPImageFetchRequest.h index 0ffde5c..0b94170 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageFetchRequest.h +++ b/Sources/TwitterImagePipeline/include/TIPImageFetchRequest.h @@ -6,8 +6,8 @@ // Copyright © 2020 Twitter. All rights reserved. // -#import -#import +#import "TIPDefinitions.h" +#import "TIPProgressive.h" @protocol TIPImageFetchOperationUnderlyingContext; @protocol TIPImageFetchTransformer; diff --git a/Sources/TwitterImagePipeline/include/TIPImageUtils.h b/Sources/TwitterImagePipeline/include/TIPImageUtils.h index 0bb1dea..76bf9f1 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageUtils.h +++ b/Sources/TwitterImagePipeline/include/TIPImageUtils.h @@ -8,7 +8,7 @@ #import #import -#import +#import "TIPImageTypes.h" #import #import #import diff --git a/Sources/TwitterImagePipeline/include/TIPImageViewFetchHelper.h b/Sources/TwitterImagePipeline/include/TIPImageViewFetchHelper.h index b1282b3..51328cc 100644 --- a/Sources/TwitterImagePipeline/include/TIPImageViewFetchHelper.h +++ b/Sources/TwitterImagePipeline/include/TIPImageViewFetchHelper.h @@ -6,8 +6,8 @@ // Copyright © 2020 Twitter. All rights reserved. // -#import -#import +#import "TIPImageFetchDelegate.h" +#import "TIPImageUtils.h" #import @class TIPImageFetchMetrics; diff --git a/Sources/TwitterImagePipeline/include/TIPProgressive.h b/Sources/TwitterImagePipeline/include/TIPProgressive.h index ccb151d..0126435 100644 --- a/Sources/TwitterImagePipeline/include/TIPProgressive.h +++ b/Sources/TwitterImagePipeline/include/TIPProgressive.h @@ -8,7 +8,7 @@ #import -#import +#import "TIPImageUtils.h" @class TIPImageFetchOperation; diff --git a/Sources/TwitterImagePipeline/include/UIImage+TIPAdditions.h b/Sources/TwitterImagePipeline/include/UIImage+TIPAdditions.h index e1fef0d..b60fae5 100644 --- a/Sources/TwitterImagePipeline/include/UIImage+TIPAdditions.h +++ b/Sources/TwitterImagePipeline/include/UIImage+TIPAdditions.h @@ -7,8 +7,8 @@ // #import -#import -#import +#import "TIPImageTypes.h" +#import "TIPImageUtils.h" #import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/TwitterImagePipeline/include/UIView+TIPImageFetchable.h b/Sources/TwitterImagePipeline/include/UIView+TIPImageFetchable.h index 12949e3..2ee3811 100644 --- a/Sources/TwitterImagePipeline/include/UIView+TIPImageFetchable.h +++ b/Sources/TwitterImagePipeline/include/UIView+TIPImageFetchable.h @@ -6,7 +6,7 @@ // Copyright (c) 2015 Twitter. All rights reserved. // -#import +#import "TIPImageFetchable.h" #import @class TIPImageViewFetchHelper; diff --git a/Sources/TwitterImagePipelineMP4Codec/include/TIPXMP4Codec.h b/Sources/TwitterImagePipelineMP4Codec/include/TIPXMP4Codec.h index 9b1a991..7d5ae4d 100644 --- a/Sources/TwitterImagePipelineMP4Codec/include/TIPXMP4Codec.h +++ b/Sources/TwitterImagePipelineMP4Codec/include/TIPXMP4Codec.h @@ -6,7 +6,7 @@ // Copyright © 2020 Twitter. All rights reserved. // -#import +#import "TIPImageCodecs.h" @protocol TIPXMP4DecoderConfig; diff --git a/Sources/TwitterImagePipelineWebPCodec/include/TIPXWebPCodec.h b/Sources/TwitterImagePipelineWebPCodec/include/TIPXWebPCodec.h index 042bf15..5d902e9 100644 --- a/Sources/TwitterImagePipelineWebPCodec/include/TIPXWebPCodec.h +++ b/Sources/TwitterImagePipelineWebPCodec/include/TIPXWebPCodec.h @@ -6,7 +6,7 @@ // Copyright © 2020 Twitter. All rights reserved. // -#import +#import "TIPImageCodecs.h" NS_ASSUME_NONNULL_BEGIN From 794b2bd6e82e57a4ed9c1b72c3d77c0b03e853e0 Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Fri, 26 Jan 2024 11:01:07 +0100 Subject: [PATCH 2/3] Add simplified Podspec (no support for codecs) --- TwitterImagePipeline.podspec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 TwitterImagePipeline.podspec diff --git a/TwitterImagePipeline.podspec b/TwitterImagePipeline.podspec new file mode 100644 index 0000000..4b251dd --- /dev/null +++ b/TwitterImagePipeline.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = 'TwitterImagePipeline' + s.version = '2.25.2' + s.compiler_flags = '-DTIP_PROJECT_VERSION=2.25' + s.summary = 'Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS' + s.description = 'Twitter created a framework for image loading/caching in order to fulfill the numerous needs of Twitter for iOS including being fast, safe, modular and versatile.' + s.homepage = 'https://github.com/twitter/ios-twitter-image-pipeline' + s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } + s.author = { 'Twitter' => 'opensource@twitter.com' } + s.source = { :git => 'https://github.com/twitter/ios-twitter-image-pipeline.git', :tag => s.version.to_s } + s.ios.deployment_target = '10.0' + s.swift_versions = [ 5.0 ] + s.source_files = 'Sources/TwitterImagePipeline/**/*.{h,m}', 'Sources/TIPUtils/**/*.{h,m}' + s.public_header_files = 'Sources/TwitterImagePipeline/include/*.h' +end From a86f11ee557406f995b1d62ac31f0d041a1b227d Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Fri, 26 Jan 2024 11:07:10 +0100 Subject: [PATCH 3/3] Lint podspec in CI workflow --- .github/workflows/test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7c85a3..4e1439c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,4 +36,13 @@ jobs: uses: actions/checkout@v3 - name: Run Tests run: xcodebuild clean test -scheme TwitterImagePipeline-Package -destination '${{ matrix.destination }}' - + cocoapods: + name: CocoaPods + runs-on: macOS-13 + env: + DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Validate the Pod + run: pod lib lint TwitterImagePipeline.podspec --allow-warnings