Skip to content

Commit b4f81e8

Browse files
authored
update to TIP 2.11.0 (#36)
* update to TIP 2.11.0
1 parent 45d2042 commit b4f81e8

27 files changed

+1390
-884
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: objective-c
2-
osx_image: xcode9.4
2+
osx_image: xcode10
33
script:
44
./build.sh

CHANGELOG.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,37 @@
22

33
## Info
44

5-
**Document version:** 2.10.0
5+
**Document version:** 2.11.0
66

7-
**Last updated:** 08/17/2018
7+
**Last updated:** 09/03/2018
88

99
**Author:** Nolan O'Brien
1010

1111
## History
1212

13+
### 2.11.0
14+
15+
- add support for animated images with `TIPImageViewFetchHelper` by supporting `TIPImageContainer` as well as `UIImage`
16+
- to support animated images, implement a `UIView` that adopts `TIPImageFetchable` with `tip_fetchedImageContainer` that can animate the provided `TIPImageContainer`
17+
- update `TIPImageFetchable`
18+
- add `tip_fetchedImageContainer` as optional property
19+
- mark `tip_fetchedImage` as optional
20+
- require at least one of the two methods be implemented to conform to `TIPImageFetchable`
21+
- add helper functions:
22+
- `TIPImageFetchableHasImage`
23+
- `TIPImageFetchableGetImage` and `TIPImageFetchableGetImageContainer`
24+
- `TIPImageFetchableSetImage` and `TIPImageFetchableSetImageContainer`
25+
- update `TIPImageViewFetchHelper`
26+
- add `setImageContainerAsIfLoaded:`
27+
- add `setImageContainerAsIfPlaceholder:`
28+
- update `TIPImageViewFetchHelperDataSource`
29+
- add `tip_imageContainerForFetchHelper:`
30+
- update `TIPImageViewFetchHelperDelegate`
31+
- add `tip_fetchHelper:didUpdateDisplayedImageContainer:fromSourceDimensions:isFinal:`
32+
- deprecate `tip_fetchHelper:didUpdateDisplayedImage:fromSourceDimensions:isFinal:`
33+
- add `tip_fetchHelper:shouldReloadAfterDifferentFetchCompletedWithImageContainer:dimensions:identifier:URL:treatedAsPlaceholder:manuallyStored:`
34+
- deprecate `tip_fetchHelper:shouldReloadAfterDifferentFetchCompletedWithImage:dimensions:identifier:URL:treatedAsPlaceholder:manuallyStored:`
35+
1336
### 2.10.0
1437

1538
- drop support for iOS 7

ImageSpeedComparison/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
"idiom" : "iphone",
4040
"size" : "60x60",
4141
"scale" : "3x"
42+
},
43+
{
44+
"idiom" : "ios-marketing",
45+
"size" : "1024x1024",
46+
"scale" : "1x"
4247
}
4348
],
4449
"info" : {

TIP Sample App/TwitterSearchViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ - (BOOL)tip_fetchHelper:(nonnull TIPImageViewFetchHelper *)helper shouldLoadProg
256256
return YES;
257257
}
258258

259-
//- (BOOL)tip_fetchHelper:(nonnull TIPImageViewFetchHelper *)helper shouldReloadAfterDifferentFetchCompletedWithImage:(nonnull UIImage *)image dimensions:(CGSize)dimensions identifier:(nonnull NSString *)identifier URL:(nonnull NSURL *)URL treatedAsPlaceholder:(BOOL)placeholder manuallyStored:(BOOL)manuallyStored
259+
//- (BOOL)tip_fetchHelper:(nonnull TIPImageViewFetchHelper *)helper shouldReloadAfterDifferentFetchCompletedWithImageContainer:(nonnull TIPImageContainer *)imageContainer dimensions:(CGSize)dimensions identifier:(nonnull NSString *)identifier URL:(nonnull NSURL *)URL treatedAsPlaceholder:(BOOL)placeholder manuallyStored:(BOOL)manuallyStored
260260
//{
261261
//
262262
//}

TwitterImagePipeline.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'TwitterImagePipeline'
3-
s.version = '2.10.0'
3+
s.version = '2.11.0'
44
s.summary = 'Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS'
55
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.'
66
s.homepage = 'https://github.com/twitter/ios-twitter-logging-service'

TwitterImagePipeline.xcodeproj/project.pbxproj

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@
229229
8B96C07E1AA930E500C44222 /* TIPImagePipeline.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B96C0761AA930E500C44222 /* TIPImagePipeline.m */; };
230230
8B96C09E1AA934C300C44222 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B96C09D1AA934C300C44222 /* SystemConfiguration.framework */; };
231231
8B96C0A11AA934EF00C44222 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B96C0A01AA934EF00C44222 /* libz.dylib */; };
232+
8B9845D9216550E600BDFC5C /* TIPImageFetchable.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B9845D8216550E600BDFC5C /* TIPImageFetchable.m */; };
233+
8B9845DA216550F400BDFC5C /* TIPImageFetchable.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B9845D8216550E600BDFC5C /* TIPImageFetchable.m */; };
234+
8B9845DB216550F500BDFC5C /* TIPImageFetchable.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B9845D8216550E600BDFC5C /* TIPImageFetchable.m */; };
232235
8B9B6C151E69EBEF00D9E590 /* TweetImageFetchRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B9B6C141E69EBEF00D9E590 /* TweetImageFetchRequest.swift */; };
233236
8BA232711DD430D70097B1DE /* TIPXWebPCodec.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA2326F1DD430D60097B1DE /* TIPXWebPCodec.h */; };
234237
8BA232721DD430D70097B1DE /* TIPXWebPCodec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA232701DD430D70097B1DE /* TIPXWebPCodec.m */; };
@@ -322,9 +325,15 @@
322325
8BE31CB31B9A276F009BC0B2 /* twitterfied.pjpg in Resources */ = {isa = PBXBuildFile; fileRef = 8BE31CB01B9A276F009BC0B2 /* twitterfied.pjpg */; };
323326
8BE31CB81B9A27DA009BC0B2 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B96C0A01AA934EF00C44222 /* libz.dylib */; };
324327
8BE31CB91B9A27EB009BC0B2 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B96C09D1AA934C300C44222 /* SystemConfiguration.framework */; };
328+
8BEEDB242166D436007D8384 /* TIPImagePipelineFetchingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF4D2BE21388D7F007261B7 /* TIPImagePipelineFetchingTests.m */; };
325329
8BF17B5E1ADED888004F5CAA /* TIPImageFetchProgressiveLoadingPolicies.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BF17B5B1ADED888004F5CAA /* TIPImageFetchProgressiveLoadingPolicies.h */; settings = {ATTRIBUTES = (Public, ); }; };
326330
8BF17B601ADED888004F5CAA /* TIPImageFetchProgressiveLoadingPolicies.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF17B5C1ADED888004F5CAA /* TIPImageFetchProgressiveLoadingPolicies.m */; };
327331
8BF17B681ADEE27D004F5CAA /* TIPImageFetchProgressiveLoadingPolicy+StaticClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BF17B661ADEE27D004F5CAA /* TIPImageFetchProgressiveLoadingPolicy+StaticClass.h */; settings = {ATTRIBUTES = (Public, ); }; };
332+
8BF4D2BF21388D7F007261B7 /* TIPImagePipelineFetchingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF4D2BE21388D7F007261B7 /* TIPImagePipelineFetchingTests.m */; };
333+
8BF4D2C32138939D007261B7 /* TIPTestsSharedUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BF4D2C12138939D007261B7 /* TIPTestsSharedUtils.h */; };
334+
8BF4D2C42138939D007261B7 /* TIPTestsSharedUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BF4D2C12138939D007261B7 /* TIPTestsSharedUtils.h */; };
335+
8BF4D2C52138939D007261B7 /* TIPTestsSharedUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF4D2C22138939D007261B7 /* TIPTestsSharedUtils.m */; };
336+
8BF4D2C62138939D007261B7 /* TIPTestsSharedUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF4D2C22138939D007261B7 /* TIPTestsSharedUtils.m */; };
328337
8BFB14FA1C6F80CA00A4DB02 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BFB14F91C6F80CA00A4DB02 /* UIKit.framework */; };
329338
8BFB15001C6F80DB00A4DB02 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BFB14F91C6F80CA00A4DB02 /* UIKit.framework */; };
330339
8BFF17711DF5B4AD005DE734 /* TwitterImagePipeline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BFF176A1DF5B4AD005DE734 /* TwitterImagePipeline.framework */; };
@@ -566,6 +575,7 @@
566575
8B96C0941AA9311700C44222 /* TIPImageTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TIPImageTest.m; sourceTree = "<group>"; };
567576
8B96C09D1AA934C300C44222 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
568577
8B96C0A01AA934EF00C44222 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
578+
8B9845D8216550E600BDFC5C /* TIPImageFetchable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TIPImageFetchable.m; sourceTree = "<group>"; };
569579
8B9B6C141E69EBEF00D9E590 /* TweetImageFetchRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TweetImageFetchRequest.swift; sourceTree = "<group>"; };
570580
8BA2326F1DD430D60097B1DE /* TIPXWebPCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TIPXWebPCodec.h; path = Extended/TIPXWebPCodec.h; sourceTree = "<group>"; };
571581
8BA232701DD430D70097B1DE /* TIPXWebPCodec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TIPXWebPCodec.m; path = Extended/TIPXWebPCodec.m; sourceTree = "<group>"; };
@@ -658,6 +668,9 @@
658668
8BF17B5B1ADED888004F5CAA /* TIPImageFetchProgressiveLoadingPolicies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TIPImageFetchProgressiveLoadingPolicies.h; sourceTree = "<group>"; };
659669
8BF17B5C1ADED888004F5CAA /* TIPImageFetchProgressiveLoadingPolicies.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TIPImageFetchProgressiveLoadingPolicies.m; sourceTree = "<group>"; };
660670
8BF17B661ADEE27D004F5CAA /* TIPImageFetchProgressiveLoadingPolicy+StaticClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TIPImageFetchProgressiveLoadingPolicy+StaticClass.h"; sourceTree = "<group>"; };
671+
8BF4D2BE21388D7F007261B7 /* TIPImagePipelineFetchingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TIPImagePipelineFetchingTests.m; sourceTree = "<group>"; };
672+
8BF4D2C12138939D007261B7 /* TIPTestsSharedUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TIPTestsSharedUtils.h; sourceTree = "<group>"; };
673+
8BF4D2C22138939D007261B7 /* TIPTestsSharedUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TIPTestsSharedUtils.m; sourceTree = "<group>"; };
661674
8BFB14F91C6F80CA00A4DB02 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
662675
8BFBD3471AA77DB2007A08DD /* libTwitterImagePipeline.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTwitterImagePipeline.a; sourceTree = BUILT_PRODUCTS_DIR; };
663676
8BFBD34A1AA77DB2007A08DD /* TwitterImagePipeline.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TwitterImagePipeline.h; sourceTree = "<group>"; };
@@ -1033,6 +1046,7 @@
10331046
8B6968CF1BC6AC4400ADDAF5 /* TIPImageContainer.h */,
10341047
8B6968D01BC6AC4400ADDAF5 /* TIPImageContainer.m */,
10351048
8B2547B51FCC70FF007EAAAA /* TIPImageFetchable.h */,
1049+
8B9845D8216550E600BDFC5C /* TIPImageFetchable.m */,
10361050
8B725B611AB73A1000786F5E /* TIPImageFetchDelegate.h */,
10371051
8B2031D11D6E36FF00E9E88F /* TIPImageFetchDownload.h */,
10381052
8B2031D21D6E36FF00E9E88F /* TIPImageFetchDownload.m */,
@@ -1075,6 +1089,7 @@
10751089
children = (
10761090
8BFBD3571AA77DB2007A08DD /* Supporting Files */,
10771091
8B9607AF1C63CF1800C99B71 /* TIPImageFetchDelegateTests.m */,
1092+
8BF4D2BE21388D7F007261B7 /* TIPImagePipelineFetchingTests.m */,
10781093
8B4F59931AEEE3CA0071AD95 /* TIPImagePipelineTests.m */,
10791094
8B96C0941AA9311700C44222 /* TIPImageTest.m */,
10801095
8B4F99961ECA9C5200E3DE74 /* TIPImageViewTests.m */,
@@ -1083,6 +1098,8 @@
10831098
8B56927D1D7329BB00E07D32 /* TIPTestImageFetchDownloadInternalWithStubbing.m */,
10841099
8BA975621D77E34000601D70 /* TIPTests.h */,
10851100
8BA975631D77E34000601D70 /* TIPTests.m */,
1101+
8BF4D2C12138939D007261B7 /* TIPTestsSharedUtils.h */,
1102+
8BF4D2C22138939D007261B7 /* TIPTestsSharedUtils.m */,
10861103
8BB118F81D834EC200E75CD9 /* TIPTestURLProtocol.h */,
10871104
8BB118F91D834EC200E75CD9 /* TIPTestURLProtocol.m */,
10881105
8B0D231F1B0307B300DD4C7B /* TIPUtilitiesTests.m */,
@@ -1142,6 +1159,7 @@
11421159
isa = PBXHeadersBuildPhase;
11431160
buildActionMask = 2147483647;
11441161
files = (
1162+
8BF4D2C42138939D007261B7 /* TIPTestsSharedUtils.h in Headers */,
11451163
8B6511F22135DEB400ED057B /* TIPTestImageFetchDownloadInternalWithStubbing.h in Headers */,
11461164
8B6511F32135DEB400ED057B /* TIPTestURLProtocol.h in Headers */,
11471165
8B6511F52135DEB400ED057B /* TIPTests.h in Headers */,
@@ -1217,6 +1235,7 @@
12171235
8BA9756A1D77E34D00601D70 /* TIPTestImageFetchDownloadInternalWithStubbing.h in Headers */,
12181236
8BB118FA1D834EC200E75CD9 /* TIPTestURLProtocol.h in Headers */,
12191237
8BA232711DD430D70097B1DE /* TIPXWebPCodec.h in Headers */,
1238+
8BF4D2C32138939D007261B7 /* TIPTestsSharedUtils.h in Headers */,
12201239
8BA9756C1D77E34D00601D70 /* TIPTests.h in Headers */,
12211240
8B70D9681E7B46BC0082EF39 /* TIPXMP4Codec.h in Headers */,
12221241
);
@@ -1470,7 +1489,7 @@
14701489
isa = PBXProject;
14711490
attributes = {
14721491
LastSwiftUpdateCheck = 0820;
1473-
LastUpgradeCheck = 0940;
1492+
LastUpgradeCheck = 1010;
14741493
ORGANIZATIONNAME = Twitter;
14751494
TargetAttributes = {
14761495
8B63017F1E68F9B400C9A86A = {
@@ -1698,6 +1717,7 @@
16981717
8B6511A92135DE7300ED057B /* NSData+TIPAdditions.m in Sources */,
16991718
8B6511AA2135DE7300ED057B /* TIPPartialImage.m in Sources */,
17001719
8B6511AB2135DE7300ED057B /* TIPImageCodecs.m in Sources */,
1720+
8B9845DB216550F500BDFC5C /* TIPImageFetchable.m in Sources */,
17011721
8B6511AC2135DE7300ED057B /* TIPImageTypes.m in Sources */,
17021722
8B6511AD2135DE7300ED057B /* TIPSafeOperation.m in Sources */,
17031723
8B6511AE2135DE7300ED057B /* TIPTiming.m in Sources */,
@@ -1729,6 +1749,8 @@
17291749
8B6511E92135DEB400ED057B /* TIPProblematicImagesTest.m in Sources */,
17301750
8B6511EA2135DEB400ED057B /* TIPTestURLProtocol.m in Sources */,
17311751
8B6511EC2135DEB400ED057B /* TIPXMP4Codec.m in Sources */,
1752+
8BF4D2C62138939D007261B7 /* TIPTestsSharedUtils.m in Sources */,
1753+
8BEEDB242166D436007D8384 /* TIPImagePipelineFetchingTests.m in Sources */,
17321754
);
17331755
runOnlyForDeploymentPostprocessing = 0;
17341756
};
@@ -1758,13 +1780,15 @@
17581780
8B4F99971ECA9C5200E3DE74 /* TIPImageViewTests.m in Sources */,
17591781
8BA9756E1D77E34D00601D70 /* TIPUtilitiesTests.m in Sources */,
17601782
8BA975661D77E34D00601D70 /* TIPImageFetchDelegateTests.m in Sources */,
1783+
8BF4D2C52138939D007261B7 /* TIPTestsSharedUtils.m in Sources */,
17611784
8BA9756B1D77E34D00601D70 /* TIPTestImageFetchDownloadInternalWithStubbing.m in Sources */,
17621785
8BA975671D77E34D00601D70 /* TIPImagePipelineTests.m in Sources */,
17631786
8BA9756D1D77E34D00601D70 /* TIPTests.m in Sources */,
17641787
8BA975691D77E34D00601D70 /* TIPProblematicImagesTest.m in Sources */,
17651788
8BB118FB1D834EC200E75CD9 /* TIPTestURLProtocol.m in Sources */,
17661789
8BA232721DD430D70097B1DE /* TIPXWebPCodec.m in Sources */,
17671790
8B70D96D1E7B896F0082EF39 /* TIPXMP4Codec.m in Sources */,
1791+
8BF4D2BF21388D7F007261B7 /* TIPImagePipelineFetchingTests.m in Sources */,
17681792
);
17691793
runOnlyForDeploymentPostprocessing = 0;
17701794
};
@@ -1818,6 +1842,7 @@
18181842
8B2031D41D6E36FF00E9E88F /* TIPImageFetchDownload.m in Sources */,
18191843
8BC2179D1DDF69DB0017B0DA /* TIPImageRenderedCache.m in Sources */,
18201844
8BC2179F1DDF69DB0017B0DA /* TIPImageStoreAndMoveOperations.m in Sources */,
1845+
8B9845D9216550E600BDFC5C /* TIPImageFetchable.m in Sources */,
18211846
8BC217861DDF69DB0017B0DA /* TIP_ProjectCommon.m in Sources */,
18221847
8BC2178C1DDF69DB0017B0DA /* TIPImageCacheEntry.m in Sources */,
18231848
8B228B561DD14D1E009E8F6F /* TIPImageCodecs.m in Sources */,
@@ -1869,6 +1894,7 @@
18691894
3D1659E0207300C200AA140A /* TIPImagePipelineInspectionResult.m in Sources */,
18701895
3D1659E2207300C200AA140A /* TIPImageUtils.m in Sources */,
18711896
3D1659C4207300C200AA140A /* NSDictionary+TIPAdditions.m in Sources */,
1897+
8B9845DA216550F400BDFC5C /* TIPImageFetchable.m in Sources */,
18721898
3D1659E5207300C200AA140A /* UIImage+TIPAdditions.m in Sources */,
18731899
3D1659D5207300C200AA140A /* TIPFileUtils.m in Sources */,
18741900
3D1659CF207300C200AA140A /* TIPImageRenderedCache.m in Sources */,
@@ -2393,7 +2419,7 @@
23932419
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
23942420
CODE_SIGN_STYLE = Manual;
23952421
COPY_PHASE_STRIP = NO;
2396-
CURRENT_PROJECT_VERSION = 2.10;
2422+
CURRENT_PROJECT_VERSION = 2.11;
23972423
DEAD_CODE_STRIPPING = NO;
23982424
DYLIB_COMPATIBILITY_VERSION = 1;
23992425
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
@@ -2406,6 +2432,7 @@
24062432
GCC_PREPROCESSOR_DEFINITIONS = (
24072433
"DEBUG=1",
24082434
"$(inherited)",
2435+
"TIP_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)",
24092436
);
24102437
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
24112438
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@@ -2463,14 +2490,15 @@
24632490
CLANG_WARN_UNREACHABLE_CODE = YES;
24642491
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24652492
CODE_SIGN_STYLE = Manual;
2466-
CURRENT_PROJECT_VERSION = 2.10;
2493+
CURRENT_PROJECT_VERSION = 2.11;
24672494
DEAD_CODE_STRIPPING = NO;
24682495
DYLIB_COMPATIBILITY_VERSION = 1;
24692496
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
24702497
ENABLE_BITCODE = NO;
24712498
ENABLE_STRICT_OBJC_MSGSEND = YES;
24722499
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Extended";
24732500
GCC_NO_COMMON_BLOCKS = YES;
2501+
GCC_PREPROCESSOR_DEFINITIONS = "TIP_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)";
24742502
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
24752503
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
24762504
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TIP Sample App.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 = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TIP Swift Sample App.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 = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TwitterImagePipeline.framework tvOS.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 = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TwitterImagePipeline.framework.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 = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/libTwitterImagePipeline.a.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 = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TwitterImagePipeline/Project/TIPDefaultImageCodecs.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ + (nullable instancetype)codecWithImageType:(NSString *)imageType
142142
TIPAssert(nil == encoder);
143143
} else if ([imageType isEqualToString:TIPImageTypeICNS]) {
144144
#if TARGET_OS_IOS
145-
TIPAssert(decoder != nil);
145+
if (@available(iOS 11, *)) {
146+
TIPAssert(decoder != nil);
147+
} else {
148+
TIPAssert(nil == decoder);
149+
}
146150
#else
147151
TIPAssert(nil == decoder);
148152
#endif

TwitterImagePipeline/Project/TIP_Project.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@
4343

4444
NSString *TIPVersion()
4545
{
46-
return @"2.10";
46+
TIPStaticAssert(TIP_PROJECT_VERSION >= 1.0 && TIP_PROJECT_VERSION <= 10.0, INVALID_TIP_VERSION);
47+
48+
#define __TIP_VERSION(version) @"" #version
49+
#define _TIP_VERSION(version) __TIP_VERSION( version )
50+
#define TIP_VERSION() _TIP_VERSION( TIP_PROJECT_VERSION )
51+
52+
return TIP_VERSION();
4753
}
4854

4955
void TIPSwizzle(Class cls, SEL originalSelector, SEL swizzledSelector)

TwitterImagePipeline/TIPGlobalConfiguration.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,13 @@ - (void)setLogger:(nullable id<TIPLogger>)logger
644644
TIPAssert(imageFetchDownloadProvider != nil);
645645
id<TIPImageFetchDownload> download = [imageFetchDownloadProvider imageFetchDownloadWithContext:context];
646646
if (context != download.context) {
647+
NSDictionary *userInfo;
648+
if (imageFetchDownloadProvider) {
649+
userInfo = @{ @"className" : NSStringFromClass([imageFetchDownloadProvider class]) };
650+
}
647651
@throw [NSException exceptionWithName:TIPImageFetchDownloadConstructorExceptionName
648652
reason:@"TIPImageFetchDownload did not adhere to protocol requirements!"
649-
userInfo:@{ @"className" : NSStringFromClass([imageFetchDownloadProvider class]) }];
653+
userInfo:userInfo];
650654
}
651655
return download;
652656
}

0 commit comments

Comments
 (0)