You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can check out the extensive test suite to see more advanced examples. The repository also comes with and example Xcode project, which showcases more real-life examples of tweaking AppKit classes.
156
+
You can check out the extensive test suite to see more advanced examples. The repository also comes with an example Xcode project, which showcases more real-life examples of tweaking AppKit classes.
157
157
158
158
<!-- Screenshot of example app -->
159
159
@@ -196,21 +196,21 @@ Peter originally wanted to go with _Interpose_, but [Swift had (and still has) a
196
196
197
197
### Why another Objective-C swizzling library?
198
198
199
-
UIKit, AppKit, and other system frameworks written in Objective-C won’t go away and sometimes you still need to swizzle to fix bugs or tweak internal behavior. InterposeKit is meant as a rarely-needed tool for these cases, providing a simple, Swift-friendly API.
199
+
UIKit, AppKit, and other system frameworks written in Objective-C won’t go away and sometimes you still need to swizzle to fix bugs or tweak internal behavior. InterposeKit is meant as a rarelyneeded tool for these cases, providing a simple, Swift-friendly API.
200
200
201
201
### What the fork?
202
202
203
-
This version of InterposeKit started as a fork of [Peter Steinberger’s original library](https://github.com/steipete/InterposeKit) but has since evolved into a significantly reworked and modernized version. The core ideas and underlying runtime techniques remain, but large parts of the Swift codebase were restructured and rewritten. <!-- To learn more about my motivation, see [my blog post](#). -->
203
+
This version of InterposeKit started as a fork of [Peter Steinberger’s original library](https://github.com/steipete/InterposeKit) but has since evolved into a *significantly reworked and modernized* version. The core ideas and underlying runtime techniques remain, but large parts of the Swift codebase were restructured and rewritten. <!-- To learn more about my motivation, see [my blog post](#). -->
204
204
205
205
### Can I hook Swift methods? And what about pure C functions?
206
206
207
-
No. Peter had plans to experiment with [Swift method hooking](https://github.com/rodionovd/SWRoute), [Swift dynamic function replacement](https://github.com/swiftlang/swift/pull/20333), and hooking C functions via [`dyld_dynamic_interpose`](https://twitter.com/steipete/status/1258482647933870080), but none made it into the library. And honestly, it doesn’t really fit the scope of this library anyway.
207
+
No. Peter had plans to experiment with [Swift method hooking](https://github.com/rodionovd/SWRoute), [Swift dynamic function replacement](https://github.com/swiftlang/swift/pull/20333), and hooking C functions via [`dyld_dynamic_interpose`](https://twitter.com/steipete/status/1258482647933870080), but none of these made it into InterposeKit, and frankly, they wouldn’t really fit the scope of this library anyway.
208
208
209
209
### Can I ship this?
210
210
211
211
Modifying the internal behavior of system frameworks always carries risks. You should know what you’re doing, use defensive programming techniques, and assume that future OS updates might break your hooks.
212
212
213
-
That said, InterposeKit is designed to be safe for production use. It includes guardrails that verify method state before applying or reverting hooks, helping catch unexpected conditions early. The focus is on simplicity and predictability, avoiding clever tricks that could introduce hidden side effects.
213
+
That said, InterposeKit is designed to be safe for production use. It includes guardrails that verify the method state before applying or reverting hooks, helping catch unexpected conditions early. The focus is on simplicity and predictability, avoiding clever tricks that could introduce hidden side effects.
0 commit comments