7 Comments
User's avatar
Tien Do's avatar

It's wrong, you can easily find an example uses pure SwiftUI view for that - "Even today, basic stuff like camera previews need to come wrapped in a UIHostingController."

Jacob Bartlett's avatar

You can do the image picker thingy, but anything more than that needs UIKit wrappers, no?

Tien Do's avatar

Picking photos is not camere, google is free. Now I see how you come with idea SwiftUI died in 2025 :)

Jacob Bartlett's avatar

Googling it, and there is no camera component?

Oh, I think I see what you mean - I meant UIViewControllerRepresentable, not UIHostingController - this is by no means a pure SwiftUI view!

Tien Do's avatar

Frankly, pure SwiftUI preview is not optimal approach, definitely SwiftUI needs to have a new camera framework. But saying you need to use UIKit is not true.

Tien Do's avatar

No, I know you can implement camera preview view with UIHostingController or UIViewControllerRepresentable. But you have the 3rd way is pure SwiftUI view, I built one for my apps.

Jacob Bartlett's avatar

I feel like I'm going crazy. What's the pure SwiftUI view where they have a camera?