Slide 1

Slide 1 text

Migrating from UIKit to Swi!UI efficiently final class MyViewController: UITableViewController { private var data = [String]() override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell") let d = data[indexPath.row] cell?.textLabel?.text = d return cell ?? UITableViewCell() } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return data.count } } ↓ struct MyView: View { private var data = [String]() var body: some View { List(data, id: \.self) { d in Text(d) } } } 1

Slide 2

Slide 2 text

Self Intro — Name: Joshua Kaplan — Work: minne @ GMO Pepabo — Interests: ! CI/CD, " frameworks, and more — Hobbies: # bread, $ history, and running 2

Slide 3

Slide 3 text

Intro 1. Why move to SwiftUI? 2. Why not move to SwiftUI? 3. Modernize Swift Usage 4. Modernize UIKit usage 5. Plan and prototype 6. Two approaches 7. Tips 3

Slide 4

Slide 4 text

Why move to Swi!UI — Do more with less code (for most things) — Easier to implement — The future of GUI development 4

Slide 5

Slide 5 text

Why not move to Swi!UI — Stability — iOS 12 and less compatibility — Low-level or high performance needs — Mixing can be difficult and painful without planning — How urgent? 5

Slide 6

Slide 6 text

Modernize Swi! usage — Migrate from Objective-C! — Use latest Swift version — Use Swiftier conventions — Use all the latest features — Get familiar with FRP frameworks 6

Slide 7

Slide 7 text

Modernize UIKit usage — Use auto layout — Support safe area — Components — Thin or no storyboards — Dynamic type and dark mode — Use declarative UIKit APIs 7

Slide 8

Slide 8 text

Plan and prototype 8

Slide 9

Slide 9 text

Prototype — Make a prototype — Identify screens/components not suited to SwiftUI — Change the design — Make an iOS 13-only feature 9

Slide 10

Slide 10 text

Architecture — Redux — The Composable Architecture (TCA) — MVVM 10

Slide 11

Slide 11 text

Two approaches 11

Slide 12

Slide 12 text

12

Slide 13

Slide 13 text

Tips — Don't mix too much — Start with easier screens — Don’t hurry — Study SwiftUI and Combine in advance 13

Slide 14

Slide 14 text

Conclusion 14

Slide 15

Slide 15 text

Thank you 15

Slide 16

Slide 16 text

Reference 16

Slide 17

Slide 17 text

Prototype — Shop.app 17

Slide 18

Slide 18 text

Combine 18

Slide 19

Slide 19 text

Docs — Official Documentation — RxSwift to Combine Cheatsheet — CombineϑϨʔϜϫʔΫ·ͱΊ 19

Slide 20

Slide 20 text

Code — CombineSwiftPlayground — Combine-MVVM — OpenCombine 20

Slide 21

Slide 21 text

Video — Introducing Combine — Combine in Practice 21

Slide 22

Slide 22 text

Books — Using Combine — Practical Combine — Understanding Combine — Combine: Asynchronous Programming with Swift 22

Slide 23

Slide 23 text

Swi!UI — Official Documentation 23

Slide 24

Slide 24 text

Books — Thinking in SwiftUI — SwiftUI by Tutorials 24