Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ let package = Package(
),
],
targets: [
.target(name: "ITKSuperBuilder"),
.target(
name: "InterposeKit",
dependencies: ["ITKSuperBuilder"]
dependencies: ["InterposeKitObjC"]
),
.target(
name: "InterposeKitObjC"
),
.testTarget(
name: "InterposeKitTests",
Expand Down
6 changes: 4 additions & 2 deletions Package@swift-6.0.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ let package = Package(
),
],
targets: [
.target(name: "ITKSuperBuilder"),
.target(
name: "InterposeKit",
dependencies: ["ITKSuperBuilder"]
dependencies: ["InterposeKitObjC"]
),
.target(
name: "InterposeKitObjC"
),
.testTarget(
name: "InterposeKitTests",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,4 @@ This library is released under the MIT license. See [LICENSE](LICENSE) for detai

[^1]: Both applying and reverting a hook include safety checks. InterposeKit detects if the method was modified externally—such as by KVO or other swizzling—and prevents the operation if it would lead to inconsistent behavior.
[^2]: There’s currently no runtime type checking. If the specified types don’t match, it will cause a runtime crash.
[^3]: The most advanced part of this library is `ITKSuperBuilder`, a component for constructing method implementations that simply call `super`, which is [surprisingly hard to do](https://steipete.me/posts/calling-super-at-runtime/). It’s written in Objective-C and assembly, lives in its own SPM target, and is invoked from Swift. All credit goes to Peter, who originally came up with this masterpiece!
[^3]: The most advanced part of this library is `ITKSuperBuilder`, a component for constructing method implementations that simply call `super`, which is [surprisingly hard to do](https://steipete.me/posts/calling-super-at-runtime/). It’s written in Objective-C and assembly, lives in an Objective-C SPM target, and is invoked from Swift. All credit goes to Peter, who originally came up with this masterpiece!
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ITKSuperBuilder
import InterposeKitObjC
import ObjectiveC

internal final class ObjectHookStrategy: HookStrategy {
Expand Down