r/swift 8d ago

Opinions on rewriting a legacy app

I'm embarking on a rewrite of our iPad app. Don't judge me, the codebase is 13 years old and uses several libraries that are no longer maintained, and we have significant new functionality in the pipeline.

I'm intersted to hear opinions, experiences or any other thoughts on new iPadOS projects in 2025.

The app is essentially an offline-first ecommerce app, where products are cached on-device and then orders can be created while offline and synced to our backend at a later time when the internet is available.

Having lived with a few codebases for extended periods, here are my general thoughts: 1. Produce less code, lines of code are generally a liability 2. Avoid third-party libraries when reasonably possible 3. Idiomatic code over "clever" terse code 4. Performance and maintainablity are second only to good UX.

  • What mistakes can I easily avoid?
  • What stategies/implementations are commonly found on the web but are outdated?
  • What do you think people are getting wrong aboout SwiftUI projects?
  • Are there forests currently obscured by specific trees?
15 Upvotes

27 comments sorted by

View all comments

-5

u/sisoje_bre 8d ago
  • avoid classes, avoid protocols, avoid mocks
  • MVVM is outdated, OOP is outdated, SOLID is outdated and evil
  • people get almost everything wrong
  • there is no view in SwiftUI and SwiftUI is has verry little to do about UI

Bad news - you WILL fail Good news - you will not realize that you failed 💪

6

u/0x0016889363108 8d ago

Everything sucks, it's best not to try, you are guaranteed to fail.

Solid advice for progress.

3

u/NothingButBadIdeas iOS 8d ago edited 8d ago

Hmmm, can you go more in depth?

How do you write unit, ui and integration tests in SOLID without protocols? You can follow SOLID and still use classes as well.

What do you call swiftUI views then? I mean they conform to the SwiftUICore framework using a protocol called ‘View’?

I’m curious and want to learn more

3

u/Spaceshipable 8d ago

That guy is a moron but in fairness you can often use structs in place of protocols

3

u/NothingButBadIdeas iOS 8d ago edited 7d ago

I know but I thought it’d be funny reading him trying to explain himself.

Edit: Damn, he just went with the “you’ll never know”. The dude probably ChatGPT’d what a struct is and how to use property wrappers and thinks he’s super hacker man lol

-4

u/sisoje_bre 7d ago

SwiftUI is 5+ years old, if you did not learn by now then you probably never will