4 ms·
Interesting! So all the NS_SWIFT_UNAVAILABLE APIs are still easily bypassable in Swift?
by papereditor 3y ago
Interesting!
So all the NS_SWIFT_UNAVAILABLE APIs are still easily bypassable in Swift?
- jshier 3y agoDepends what they are. Most of the time those are unavailable because they've been replaced with better Swift imports of the same API somewhere. Less commonly it's because they use one of the few C features that can't be imported into Swift or, even more rarely, because the API is fundamentally unsafe and they don't want it available in Swift. In all cases you can reexpose these APIs to Swift by writing your own C wrapper.
- KerrAvon 3y agoYes, it's very rare that something is actually unavailable. You can even use things like `sysctlbyname` in Swift without writing C.