Skip to content

Commit 8d4bbb3

Browse files
committed
Removed irrelevant deprecation
1 parent 9f2d592 commit 8d4bbb3

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

Sources/InterposeKit/Deprecated/NSObject+Deprecated.swift

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@ import ObjectiveC
22

33
extension NSObject {
44

5-
@available(*, deprecated, renamed: "applyHook(for:methodSignature:hookSignature:build:)")
6-
@discardableResult
7-
public func addHook<MethodSignature, HookSignature>(
8-
for selector: Selector,
9-
methodSignature: MethodSignature.Type,
10-
hookSignature: HookSignature.Type,
11-
implementation: @escaping HookBuilder<MethodSignature, HookSignature>
12-
) throws -> Hook {
13-
return try self.applyHook(
14-
for: selector,
15-
methodSignature: methodSignature,
16-
hookSignature: hookSignature,
17-
build: implementation
18-
)
19-
}
20-
215
@available(*, deprecated, renamed: "applyHook(for:methodSignature:hookSignature:build:)")
226
@discardableResult
237
public func hook<MethodSignature, HookSignature> (
@@ -31,11 +15,11 @@ extension NSObject {
3115
"There should not be a way to cast an NSObject to AnyClass."
3216
)
3317

34-
return try self.addHook(
18+
return try self.applyHook(
3519
for: selector,
3620
methodSignature: methodSignature,
3721
hookSignature: hookSignature,
38-
implementation: build
22+
build: build
3923
)
4024
}
4125

0 commit comments

Comments
 (0)