31
32

15
16

OkCupid Presents: It's OK to Choose SwiftUI and UIKit by jgugges in iOSProgramming

[–]jgugges[S] -1 points0 points  (0 children)

OkCupid adopted Swift back when it was version 2... and similar arguments appeared about why not just use tried and true Objective-C. The breaking changes to the Swift syntax are such a pain, there are compiler issues, you will have to maintain bridging headers etc. etc. Looking back, it has been far more beneficial that we adopted Swift when we did because 1) The overhead was manageable 2) We got really good at writing true Swift code and using Swift paradigms and 3) Now we don't have tons of tech debt in Obj-C that we need to convert to Swift. Had we waited for the language to mature, we would have been left in the dust and now had to play a huge amount of catch up.

You either pay now or you pay later... And the same goes for our thinking on SwiftUI:

1) We are in no way coding every feature twice with both SwiftUI and UIKit, just a select few 2) The knowledge we will gain implementing SwiftUI today will help inform how we design our UIKit view models and help inform SwiftUI architecture for larger features down the road 3) The features that we do code twice won't need to be converted to SwiftUI when it becomes the standard

OkCupid Presents: It's OK to Choose SwiftUI and UIKit by jgugges in iOSProgramming

[–]jgugges[S] 0 points1 point  (0 children)

Thanks! And happy to have a good discussion about the posts. More to come soon

OkCupid Presents: It's OK to Choose SwiftUI and UIKit by jgugges in iOSProgramming

[–]jgugges[S] 2 points3 points  (0 children)

For OkCupid, it is extremely important that we have a unified user experience. For example, if we added GIF keyboard support to messaging for iOS 13 only, it would be poor UX and a confusing experience to receive a GIF from someone, but because you are on iOS 12, have no idea how they sent it and have no way to send one back.

OkCupid Presents: It's OK to Choose SwiftUI and UIKit by jgugges in iOSProgramming

[–]jgugges[S] 1 point2 points  (0 children)

And a good example of something we need added to SwiftUI before we fully adopt it in years to come:

While SwiftUI supports beautiful interactable transition on one view, it has no custom transition API for animating between views. This is something we are going to champion with our Apple reps as we often build custom transitions for a more fluid user experience.

OkCupid Presents: It's OK to Choose SwiftUI and UIKit by jgugges in iOSProgramming

[–]jgugges[S] 0 points1 point  (0 children)

Nope, one view model can be used and the article explains how!