|
|
|
|
|
by gregkerzhner
2326 days ago
|
|
Curious how you have handled some of these challenges: 1. What do you do to avoid massive view controllers? I have found that a lot of iOS apps I have worked on end up having the view controller be responsible for doing everything from fetching data from an API to setting the corner radius on some component. This leads to view controllers being really big and not unit tested. 2. Do you do anything to explicitly keep your application state in one place? I find that state in iOS apps ends up being scattered between a data store, singletons and view controllers. This is a lot more cumberesome than something like Redux where state is just in a single store. 3. I am pretty excited about SwiftUI as it addresses a lot of these pain points and brings iOS development into a more modern era similar to React. What is your opinion of SwiftUI? Are you using it on your apps? If so, what have been the challenges of introducing it into existing apps? If not, why not? |
|
2. No. Again not helpful. This is a domain specific problem. I will say I'm waging a now multi-decade war against singletons. Dependency injection is the way to go. For Swift checkout Swinject, it really superpowers your testing.
3. Haven't touched it... yet. My primary projects need to ship and my secondary projects haven't hit the point of UI. Won't until later this year. Then I'll deal with SwiftUI. Combine, however, is my new hawtness and I recommend diving into.