Let's talk about making portable libraries with Swift clients. Has anyone made a tool yet to autogen Obj-C wrappers for C++ interfaces?
Conversation
3
1
10
Logic should be common code. Only the parts that *must* be platform specific (UI, HAL, etc.) should be.
3
Yeah, agreed. I want to keep my UIKit-interacting layer paper thin. Interacting with UIKit counts w.r.t. SRP.
2
Shared model, of course. We do a lot of shared drawing, even, w/ CG between iOS/Macโฆ
2
But UX usually should vary widely between iOS/Mac and thus be relatively thick layer, IMHO.
3
I want as much as possible of even my UI behaviors in isolated value-oriented layers.
1
Right, and that's not for sharing. That's for isolation, predictability, and testability.
2
Replying to
No need to entangle complex UI logic with another incredibly complex actor (i.e. UIKit).




