Skip to content

Commit 569c1eb

Browse files
committed
README: Minor tweaks
1 parent 3280db2 commit 569c1eb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ In Xcode, open your project settings, select the *Package Dependencies* tab, cli
3434

3535
If you’re adding InterposeKit using a `Package.swift` manifest, include it in your `dependencies` like this:
3636

37-
```swift
37+
```
3838
dependencies: [
3939
.package(url: "https://github.com/structuredpath/InterposeKit", from: "1.0.0")
4040
]
4141
```
4242

4343
Then add the product to any target that needs it:
4444

45-
```swift
45+
```
4646
.target(
4747
name: "YourTarget",
4848
dependencies: [
@@ -53,7 +53,7 @@ Then add the product to any target that needs it:
5353

5454
## Usage
5555

56-
### Class Hook: Instance Method
56+
### Class Hook on Instance Method
5757

5858
```swift
5959
class MyClass: NSObject {
@@ -83,7 +83,7 @@ try hook.revert()
8383
print(object.getValue()) // => 42
8484
```
8585

86-
### Class Hook: Class Method
86+
### Class Hook on Class Method
8787

8888
```swift
8989
class MyClass: NSObject {
@@ -144,7 +144,7 @@ Compared to the [original implementation](https://github.com/steipete/InterposeK
144144
- Dynamic subclasses created at runtime are now cleaned up when the last hook is reverted on an object.
145145
- Class hooks must now target the exact class that actually implements the method to ensure the revert functionality works correctly.
146146
- Added initial Swift 6 support with basic concurrency checks. Should be thread-safe, but most usage is still expected to be single-threaded.
147-
- Removed support for [delayed hooking](https://steipete.com/posts/mac-catalyst-crash-hunt/) (`whenAvailable(…)`) to keep the library laser-focused.
147+
- Removed support for [delayed hooking](https://github.com/steipete/InterposeKit?tab=readme-ov-file#delayed-hooking) (`Interpose.whenAvailable(…)`) to keep the library laser-focused.
148148
- …and heavily refactored the Swift part of the codebase: cleaner use of Objective-C runtime APIs, a revamped `InterposeError` enum, and new supporting types like `HookScope` or `HookState`.
149149

150150
### Fixes
@@ -164,7 +164,7 @@ Compared to the [original implementation](https://github.com/steipete/InterposeK
164164

165165
## License
166166

167-
InterposeKit is available under the [MIT license](LICENSE).
167+
This library is released under the MIT license. See [LICENSE](LICENSE) for details.
168168

169169
[^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.
170170
[^2]: 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!

0 commit comments

Comments
 (0)