TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Struggling with Swift vs SwiftUI in new app development

Forums > SwiftUI

I'm new to Swift and SwiftUI. I started creating a native mobile app in SwiftUI, but it seems it is limited on its capabilities at the time of this writing. As a brief bit of background, the app I'm working on doesn't seem to be terribly complicated, but there are some gotchas it seems like with using maps (MapKit) and especially Augmented Reality (ARKit). It seems there are may instances where I'm reading through tutorials and they're wrapping UIKit's functionality to work with SwiftUI, so I starting asking myself if it would just be easier to bag SwiftUI and use just Swift/ViewControllers, etc..

My questions are these:

  1. Is it preferable to use SwiftUI vs Swift at this point given that SwiftUI hasn't ported over all the functionality of UIKit?
  2. Is it possible in SwiftUI to mix Augmented Reality with a typical non-AR related functionality? (ex. having the user explicitly have to go to a AR enabled view otherwise it will display my typical views that have nothing to do with AR?
  3. Is SwiftUI a replacement for Swift? Or are the two supposed to coexist for the foreseeable future?

Any help or advice would be greatly appreciated. Thank you in advance!

4      

  1. I opted for UIKit for now (on my first own project), for two reasons, one it's hard enough learning as it is and two SwiftUI isn't mature yet. UIKit will be here for years to come ...

  2. Don't know

  3. Swift is the (core) programming language and SwiftUI / UIKit are frameworks to work with. Swift is here to stay as is UIKit and yes they work in tandem! SwiftUI is also here to stay but might need a couple of years to mature...

5      

1) I dont believe so. SwiftUI is super new and I would not recommend it to beginners at all. We also have no idea if SwiftUI will be supplementary in years to come and use to build simpler apps or if Apple plans gradually deprecate UIKit and envisions future where all the apps can be made in SwiftUI - we are nowhere near that.

2) I guess. AR view is in the end pretty standard view and the whole app does not have to be AR.

3) As Gakkienl said.

5      

Hacking with Swift is sponsored by Blaze.

SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!

Reserve your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.