Skip to content

Commit c5a45da

Browse files
authored
Merge pull request #26 from entdark/master
Updated Nuke to 12.8
2 parents f936777 + 55d6087 commit c5a45da

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "kean/Nuke" == 10.11.2
1+
github "kean/Nuke" == 12.8.0

NukeProxy.xcodeproj/project.pbxproj

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,46 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 53;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
7D013CDE265D5A2100454172 /* Nuke.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D013CDD265D5A2100454172 /* Nuke.xcframework */; };
1111
B08309D5241256530090FB75 /* NukeProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B08309D3241256530090FB75 /* NukeProxy.h */; settings = {ATTRIBUTES = (Public, ); }; };
1212
B08309E7241259650090FB75 /* NukeProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = B08309E6241259650090FB75 /* NukeProxy.swift */; };
13+
CEBEC60F2DB66ACB00FA295C /* NukeExtensions.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEBEC60E2DB66ACB00FA295C /* NukeExtensions.xcframework */; };
14+
CEBEC6102DB66ACB00FA295C /* NukeExtensions.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CEBEC60E2DB66ACB00FA295C /* NukeExtensions.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1315
/* End PBXBuildFile section */
1416

17+
/* Begin PBXCopyFilesBuildPhase section */
18+
CEBEC6112DB66ACB00FA295C /* Embed Frameworks */ = {
19+
isa = PBXCopyFilesBuildPhase;
20+
buildActionMask = 2147483647;
21+
dstPath = "";
22+
dstSubfolderSpec = 10;
23+
files = (
24+
CEBEC6102DB66ACB00FA295C /* NukeExtensions.xcframework in Embed Frameworks */,
25+
);
26+
name = "Embed Frameworks";
27+
runOnlyForDeploymentPostprocessing = 0;
28+
};
29+
/* End PBXCopyFilesBuildPhase section */
30+
1531
/* Begin PBXFileReference section */
1632
7D013CDD265D5A2100454172 /* Nuke.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Nuke.xcframework; path = Carthage/Build/Nuke.xcframework; sourceTree = "<group>"; };
1733
B08309D0241256530090FB75 /* NukeProxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NukeProxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1834
B08309D3241256530090FB75 /* NukeProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NukeProxy.h; sourceTree = "<group>"; };
1935
B08309D4241256530090FB75 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2036
B08309E6241259650090FB75 /* NukeProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NukeProxy.swift; sourceTree = "<group>"; };
37+
CEBEC60E2DB66ACB00FA295C /* NukeExtensions.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = NukeExtensions.xcframework; path = Carthage/Build/NukeExtensions.xcframework; sourceTree = "<group>"; };
2138
/* End PBXFileReference section */
2239

2340
/* Begin PBXFrameworksBuildPhase section */
2441
B08309CD241256530090FB75 /* Frameworks */ = {
2542
isa = PBXFrameworksBuildPhase;
2643
buildActionMask = 2147483647;
2744
files = (
45+
CEBEC60F2DB66ACB00FA295C /* NukeExtensions.xcframework in Frameworks */,
2846
7D013CDE265D5A2100454172 /* Nuke.xcframework in Frameworks */,
2947
);
3048
runOnlyForDeploymentPostprocessing = 0;
@@ -62,6 +80,7 @@
6280
B08309DB241256A70090FB75 /* Frameworks */ = {
6381
isa = PBXGroup;
6482
children = (
83+
CEBEC60E2DB66ACB00FA295C /* NukeExtensions.xcframework */,
6584
7D013CDD265D5A2100454172 /* Nuke.xcframework */,
6685
);
6786
name = Frameworks;
@@ -89,6 +108,7 @@
89108
B08309CC241256530090FB75 /* Sources */,
90109
B08309CD241256530090FB75 /* Frameworks */,
91110
B08309CE241256530090FB75 /* Resources */,
111+
CEBEC6112DB66ACB00FA295C /* Embed Frameworks */,
92112
);
93113
buildRules = (
94114
);

NukeProxy/NukeProxy.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Foundation
1010
import UIKit
1111
import Nuke
12-
12+
import NukeExtensions
1313

1414
@objc(ImagePipeline)
1515
public class ImagePipeline : NSObject {
@@ -54,7 +54,6 @@ public class ImagePipeline : NSObject {
5454
public func loadImage(url: URL, onCompleted: @escaping (UIImage?, String) -> Void) -> Int64 {
5555
let task = Nuke.ImagePipeline.shared.loadImage(
5656
with: url,
57-
progress: nil,
5857
completion: { [weak self] result in
5958
switch result {
6059
case let .success(response):
@@ -69,19 +68,19 @@ public class ImagePipeline : NSObject {
6968
return addTask(task)
7069
}
7170

72-
@objc
71+
@MainActor @objc
7372
public func loadImage(url: URL, placeholder: UIImage?, errorImage: UIImage?, into: UIImageView) -> Int64 {
7473
return loadImage(url: url, placeholder: placeholder, errorImage: errorImage, into: into, reloadIgnoringCachedData: false)
7574
}
7675

77-
@objc
76+
@MainActor @objc
7877
public func loadImage(url: URL, placeholder: UIImage?, errorImage: UIImage?, into: UIImageView, reloadIgnoringCachedData: Bool) -> Int64 {
7978
let options = ImageLoadingOptions(placeholder: placeholder, failureImage: errorImage)
8079
let cachePolicy = reloadIgnoringCachedData ? URLRequest.CachePolicy.reloadIgnoringLocalAndRemoteCacheData : URLRequest.CachePolicy.useProtocolCachePolicy
8180
let urlRequest = URLRequest(url: url, cachePolicy: cachePolicy)
8281
let request = ImageRequest(urlRequest: urlRequest)
8382

84-
let task = Nuke.loadImage(
83+
let task = NukeExtensions.loadImage(
8584
with: request,
8685
options: options,
8786
into: into
@@ -90,19 +89,19 @@ public class ImagePipeline : NSObject {
9089
return addTask(task)
9190
}
9291

93-
@objc
92+
@MainActor @objc
9493
public func loadImage(url: URL, imageIdKey: String, placeholder: UIImage?, errorImage: UIImage?, into: UIImageView) -> Int64 {
9594
return loadImage(url: url, imageIdKey: imageIdKey, placeholder: placeholder, errorImage: errorImage, into: into, reloadIgnoringCachedData: false)
9695
}
9796

98-
@objc
97+
@MainActor @objc
9998
public func loadImage(url: URL, imageIdKey: String, placeholder: UIImage?, errorImage: UIImage?, into: UIImageView, reloadIgnoringCachedData: Bool) -> Int64 {
10099
let options = ImageLoadingOptions(placeholder: placeholder, failureImage: errorImage)
101100
let cachePolicy = reloadIgnoringCachedData ? URLRequest.CachePolicy.reloadIgnoringLocalAndRemoteCacheData : URLRequest.CachePolicy.useProtocolCachePolicy
102101
let urlRequest = URLRequest(url: url, cachePolicy: cachePolicy)
103102
let request = ImageRequest(urlRequest: urlRequest, userInfo: [.imageIdKey: imageIdKey])
104103

105-
let task = Nuke.loadImage(
104+
let task = NukeExtensions.loadImage(
106105
with: request,
107106
options: options,
108107
into: into

src/ImageCaching.Nuke/ImageCaching.Nuke.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474
<Kind>Framework</Kind>
7575
<SmartLink>False</SmartLink>
7676
</NativeReference>
77+
<NativeReference Include="..\..\Carthage\Build\NukeExtensions.xcframework">
78+
<Kind>Framework</Kind>
79+
<SmartLink>False</SmartLink>
80+
</NativeReference>
7781
</ItemGroup>
7882

7983
</Project>

0 commit comments

Comments
 (0)