Skip to content

Commit 9f8fa35

Browse files
authored
Merge pull request #2 from colinhumber/typos
Fix a couple of typos
2 parents 41a78d7 + d22bffa commit 9f8fa35

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
@@ -51,7 +51,7 @@ let interposer = try Interpose(TestClass.self) {
5151
interposer.revert()
5252
```
5353

54-
Here's what we get when calling `print(TestClass().sayHi())`
54+
Here's what we get when calling `print(TestClass().sayHi())`
5555
```
5656
[Interposer] Swizzled -[TestClass.sayHi] IMP: 0x000000010d9f4430 -> 0x000000010db36020
5757
Before Interposing <InterposeTests.TestClass: 0x7fa0b160c1e0>
@@ -62,7 +62,7 @@ Hi there 👋 and Interpose
6262

6363
## Key Facts
6464

65-
- Interpose directly modifies the implementaton of a `Method`, which is [better than selector-based swizzling]((https://pspdfkit.com/blog/2019/swizzling-in-swift/)).
65+
- Interpose directly modifies the implementation of a `Method`, which is [better than selector-based swizzling]((https://pspdfkit.com/blog/2019/swizzling-in-swift/)).
6666
- Hooks can easily be undone via calling `revert()`. This also checks and errors if someone else changed stuff in between.
6767
- Pure Swift, no `NSInvocation`, which requires boxing and can be slow.
6868
- No Type checking. If you have a typo or forget a `convention` part, this will crash at runtime.
@@ -94,10 +94,10 @@ try Interpose.whenAvailable(["RTIInput", "SystemSession"]) {
9494
Naming it Interpose was the plan, but then [SR-898](https://bugs.swift.org/browse/SR-898) came. While having a class with the same name as the module works [in most cases](https://forums.swift.org/t/frameworkname-is-not-a-member-type-of-frameworkname-errors-inside-swiftinterface/28962), [this breaks](https://twitter.com/BalestraPatrick/status/1260928023357878273) when you enable build-for-distribution. There's some [discussion](https://forums.swift.org/t/pitch-fully-qualified-name-syntax/28482/81) to get that fixed, but this will be more towards end of 2020, if even.
9595

9696
### I want to hook into Swift! You made another ObjC swizzle thingy, why?
97-
UIKit and AppKit won't go away, and the bugs won't go away either. I see this as a rarely-needed instrument to fix system-level issues. There are ways to do some of that in Swift, but that's a separate (and much more difficult!) project.
97+
UIKit and AppKit won't go away, and the bugs won't go away either. I see this as a rarely-needed instrument to fix system-level issues. There are ways to do some of that in Swift, but that's a separate (and much more difficult!) project.
9898

9999
### Can I ship this?
100-
Yes, absolutely. The goal for this one prokect is a simple library that doesn't try to be too smart. I did this in [Aspects](https://github.com/steipete/Aspects) and while I loved this to no end, it's problematic and can cause side-effects with other code that tries to be clever. InterposeKit is boring, so you don't have to worry about conditions like "We added New Relic to our app and now [your thing crashes](https://github.com/steipete/Aspects/issues/21)".
100+
Yes, absolutely. The goal for this one project is a simple library that doesn't try to be too smart. I did this in [Aspects](https://github.com/steipete/Aspects) and while I loved this to no end, it's problematic and can cause side-effects with other code that tries to be clever. InterposeKit is boring, so you don't have to worry about conditions like "We added New Relic to our app and now [your thing crashes](https://github.com/steipete/Aspects/issues/21)".
101101

102102
### It does not do X!
103103
Pull Requests welcome! You might wanna open a draft before to lay out what you plan, I want to keep the feature-set minimal so it stays simple and no-magic.
@@ -122,12 +122,12 @@ Add `github "steipete/InterposeKit"` to your `Cartfile`.
122122
## Improvement Ideas
123123

124124
- Write proposal to allow to [convert the calling convention of existing types](https://twitter.com/steipete/status/1266799174563041282?s=21).
125-
- Use the C block struct to perfom type checking between Method type and C type (I do that in [Aspects library](https://github.com/steipete/Aspects)), it's still a runtime crash but could be at hook time, not when we call it.
125+
- Use the C block struct to perform type checking between Method type and C type (I do that in [Aspects library](https://github.com/steipete/Aspects)), it's still a runtime crash but could be at hook time, not when we call it.
126126
- Add object-based hooking with dynamic subclassing (Aspects again)
127127
- Add [dyld_dynamic_interpose](https://twitter.com/steipete/status/1258482647933870080) to hook pure C functions
128128
- Combine Promise-API for `Interpose.whenAvailable` for better error bubbling.
129129
- Experiment with [Swift function hooking](https://github.com/rodionovd/SWRoute/wiki/Function-hooking-in-Swift)? ⚡️
130-
- Test against Swift Nightly as Chron Jpb
130+
- Test against Swift Nightly as Cron Job
131131
- I'm sure there's more - Pull Requests or [comments](https://twitter.com/steipete) very welcome!
132132

133133
Make this happen:

0 commit comments

Comments
 (0)