Skip to content

Commit cf5900d

Browse files
authored
v2.13.0 (#50)
- Xcode 11 support - Improved Mac Catalyst support - Offer authentication support for image requests (not in hydration) - __FILE_NAME__ instead of __FILE__ used - Optimize `tip_safeSubdataNoCopyWithRange:` - Optimize NSDictionary `tip_copyToMutable:uppercase:` - Optimize `TIPContentsAtPath(...)` - Fix issue where multi-rez image containers were decoding as animations
1 parent 38f080e commit cf5900d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+676
-182
lines changed

BuildConfiguration/TwitterImagePipeline.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@ CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
129129
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
130130

131131
// Versioning
132-
CURRENT_PROJECT_VERSION = 2.12
132+
CURRENT_PROJECT_VERSION = 2.13
133133
VERSIONING_SYSTEM = apple-generic

CHANGELOG.md

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

33
## Info
44

5-
**Document version:** 2.12.2
5+
**Document version:** 2.13.0
66

7-
**Last updated:** 03/03/2019
7+
**Last updated:** 07/04/2019
88

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

1111
## History
1212

13+
### 2.13.0
14+
15+
- Separate out authentication support for image requests from hydration support
16+
- Hydration now just serves populating the image fetch's URL request
17+
- Authorization now serves to generate an _Authorization_ header's value to be applied as a separate step
18+
- Works better with multi step networking frameworks such as __TwitterNetworkLayer__
19+
- See `[TIPImageFetchRequest imageRequestAuthorizationBlock]`
20+
1321
### 2.12.2
1422

1523
- Add automatic handling of unnecessary image download errors when the download has finished loading

Extended/TIPXMP4Codec.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,11 @@ - (nullable TIPImageContainer *)renderImageWithMode:(TIPImageDecoderRenderMode)m
276276
AVAssetReader *reader = [AVAssetReader assetReaderWithAsset:self->_avAsset error:&error];
277277
if (!reader) {
278278
[[TIPGlobalConfiguration sharedInstance].logger tip_logWithLevel:TIPLogLevelWarning
279+
#if defined(__FILE_NAME__)
280+
file:@(__FILE_NAME__)
281+
#else
279282
file:@(__FILE__)
283+
#endif
280284
function:@(__FUNCTION__)
281285
line:__LINE__
282286
message:error.description];

Extended/TIPXWebPCodec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <TargetConditionals.h>
1010

11-
#if !TARGET_OS_UIKITFORMAC
11+
#if !TARGET_OS_MACCATALYST
1212

1313
#import <TwitterImagePipeline/TIPImageCodecs.h>
1414

@@ -32,4 +32,4 @@ FOUNDATION_EXTERN NSString * const TIPXImageTypeWebP;
3232

3333
NS_ASSUME_NONNULL_END
3434

35-
#endif // #if !TARGET_OS_UIKITFORMAC
35+
#endif // #if !TARGET_OS_MACCATALYST

Extended/TIPXWebPCodec.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <TargetConditionals.h>
1010

11-
#if !TARGET_OS_UIKITFORMAC
11+
#if !TARGET_OS_MACCATALYST
1212

1313
#import <Accelerate/Accelerate.h>
1414
#import <TwitterImagePipeline/TwitterImagePipeline.h>
@@ -588,4 +588,4 @@ static BOOL TIPXWebPCreateRGBADataForImage(CGImageRef sourceImage,
588588

589589
NS_ASSUME_NONNULL_END
590590

591-
#endif // #if !TARGET_OS_UIKITFORMAC
591+
#endif // #if !TARGET_OS_MACCATALYST

GraphicsRendererSpeed/ViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ - (NSTimeInterval)_q_scaleSpeedCheckWithImage:(UIImage *)image dimensions:(CGSiz
232232
} else if (RenderBehaviorModernForcePrefersWideColorYes == behavior) {
233233
format.preferredRange = UIGraphicsImageRendererFormatRangeExtended;
234234
}
235-
#if !TARGET_OS_UIKITFORMAC
235+
#if !TARGET_OS_MACCATALYST
236236
} else {
237237
if (RenderBehaviorModernForcePrefersWideColorNo == behavior) {
238238
format.prefersExtendedRange = NO;

ImageSpeedComparison/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ @implementation AppDelegate
2222
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
2323
{
2424
[TIPGlobalConfiguration sharedInstance].logger = self;
25-
#if !TARGET_OS_UIKITFORMAC
25+
#if !TARGET_OS_MACCATALYST
2626
[TIPImageCodecCatalogue sharedInstance][TIPXImageTypeWebP] = [[TIPXWebPCodec alloc] init];
2727
#endif
2828
return YES;

TIP Sample App/AppDelegate.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4040
[TIPGlobalConfiguration sharedInstance].serializeCGContextAccess = YES;
4141
[TIPGlobalConfiguration sharedInstance].clearMemoryCachesOnApplicationBackgroundEnabled = YES;
4242
[[TIPGlobalConfiguration sharedInstance] addImagePipelineObserver:self];
43-
#if !TARGET_OS_UIKITFORMAC
43+
#if !TARGET_OS_MACCATALYST
4444
[[TIPImageCodecCatalogue sharedInstance] setCodec:[[TIPXWebPCodec alloc] init] forImageType:TIPXImageTypeWebP];
4545
#endif
4646
_imagePipeline = [[TIPImagePipeline alloc] initWithIdentifier:@"Twitter.Example"];
@@ -90,7 +90,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
9090
- (void)_private_incrementNetworkOperations
9191
{
9292
if ((++_opCount) > 0) {
93-
#if !TARGET_OS_UIKITFORMAC
93+
#if !TARGET_OS_MACCATALYST
9494
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
9595
#endif
9696
}
@@ -99,7 +99,7 @@ - (void)_private_incrementNetworkOperations
9999
- (void)_private_decrementNetworkOperations
100100
{
101101
if ((--_opCount) <= 0) {
102-
#if !TARGET_OS_UIKITFORMAC
102+
#if !TARGET_OS_MACCATALYST
103103
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
104104
#endif
105105
}

TIP Sample App/TwitterSearchViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ - (void)updateSearchResultsForSearchController:(UISearchController *)searchContr
115115
{
116116
}
117117

118-
#if TARGET_OS_UIKITFORMAC
118+
#if TARGET_OS_MACCATALYST
119119
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
120120
{
121121
[NSObject cancelPreviousPerformRequestsWithTarget:self];

TIP Swift Sample App/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, TIPImagePipelineObserver,
5252
tipConfig.isClearMemoryCachesOnApplicationBackgroundEnabled = true
5353
tipConfig.add(self)
5454

55-
#if !targetEnvironment(UIKitForMac)
55+
#if !targetEnvironment(macCatalyst)
5656
let catalogue = TIPImageCodecCatalogue.sharedInstance()
5757
catalogue.setCodec(TIPXWebPCodec.init(), forImageType: TIPXImageTypeWebP)
5858
#endif

TIP Swift Sample App/TwitterSearchViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class TwitterSearchViewController: UIViewController, UISearchResultsUpdating, UI
260260
{
261261
}
262262

263-
#if targetEnvironment(UIKitForMac)
263+
#if targetEnvironment(macCatalyst)
264264
func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String)
265265
{
266266
NSObject.cancelPreviousPerformRequests(withTarget: self)

TwitterImagePipeline.xcodeproj/project.pbxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@
16451645
isa = PBXProject;
16461646
attributes = {
16471647
LastSwiftUpdateCheck = 0820;
1648-
LastUpgradeCheck = 1020;
1648+
LastUpgradeCheck = 1100;
16491649
ORGANIZATIONNAME = Twitter;
16501650
TargetAttributes = {
16511651
8B63017F1E68F9B400C9A86A = {
@@ -2272,13 +2272,15 @@
22722272
isa = XCBuildConfiguration;
22732273
baseConfigurationReference = 3DEC0A75229A71870053C279 /* TwitterImagePipeline.Debug.xcconfig */;
22742274
buildSettings = {
2275+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
22752276
};
22762277
name = Debug;
22772278
};
22782279
8BFBD35A1AA77DB2007A08DD /* Release */ = {
22792280
isa = XCBuildConfiguration;
22802281
baseConfigurationReference = 3DEC0A76229A719B0053C279 /* TwitterImagePipeline.Release.xcconfig */;
22812282
buildSettings = {
2283+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
22822284
};
22832285
name = Release;
22842286
};

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TIP GraphicsRendererSpeed.xcscheme

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TIP ImageSpeedComparison.xcscheme

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TIP Sample App.xcscheme

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TIP Swift Sample App.xcscheme

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

TwitterImagePipeline.xcodeproj/xcshareddata/xcschemes/TwitterImagePipeline.framework.tvOS.xcscheme

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -41,6 +41,15 @@
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4343
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<MacroExpansion>
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "8B6511942135DE7300ED057B"
48+
BuildableName = "TwitterImagePipeline.framework"
49+
BlueprintName = "TwitterImagePipeline.framework.tvOS"
50+
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
51+
</BuildableReference>
52+
</MacroExpansion>
4453
<Testables>
4554
<TestableReference
4655
skipped = "NO"
@@ -54,17 +63,6 @@
5463
</BuildableReference>
5564
</TestableReference>
5665
</Testables>
57-
<MacroExpansion>
58-
<BuildableReference
59-
BuildableIdentifier = "primary"
60-
BlueprintIdentifier = "8B6511942135DE7300ED057B"
61-
BuildableName = "TwitterImagePipeline.framework"
62-
BlueprintName = "TwitterImagePipeline.framework.tvOS"
63-
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
64-
</BuildableReference>
65-
</MacroExpansion>
66-
<AdditionalOptions>
67-
</AdditionalOptions>
6866
</TestAction>
6967
<LaunchAction
7068
buildConfiguration = "Debug"
@@ -85,8 +83,6 @@
8583
ReferencedContainer = "container:TwitterImagePipeline.xcodeproj">
8684
</BuildableReference>
8785
</MacroExpansion>
88-
<AdditionalOptions>
89-
</AdditionalOptions>
9086
</LaunchAction>
9187
<ProfileAction
9288
buildConfiguration = "Release"

0 commit comments

Comments
 (0)