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
InterposeKit is a modern library to swizzle elegantly in Swift. It is [well-documented](http://interposekit.com/), fully written in Swift 5.2+ and works on `@objc dynamic` Swift functions or Objective-C instance methods. The Inspiration for InterposeKit was [a race condition in Mac Catalyst](/posts/mac-catalyst-crash-hunt/), which required some tricky swizzling to fix, I also wrote up some [implementation thoughts on my blog](https://steipete.com/posts/interposekit/).
11
+
InterposeKit is a modern library to swizzle elegantly in Swift. It is [well-documented](http://interposekit.com/), fully written in Swift 5.2+ and works on `@objc dynamic` Swift functions or Objective-C instance methods. The Inspiration for InterposeKit was [a race condition in Mac Catalyst](https://steipete.com/posts/mac-catalyst-crash-hunt/), which required some tricky swizzling to fix, I also wrote up some [implementation thoughts on my blog](https://steipete.com/posts/interposekit/).
12
12
13
13
Instead of [adding new methods and exchanging implementations](https://nshipster.com/method-swizzling/) based on [`method_exchangeImplementations`](https://developer.apple.com/documentation/objectivec/1418769-method_exchangeimplementations), this library replaces the implementation directly using [`class_replaceMethod`](https://developer.apple.com/documentation/objectivec/1418677-class_replacemethod). This avoids some of [the usual problems with swizzling](https://pspdfkit.com/blog/2019/swizzling-in-swift/).
0 commit comments