ultralytics / yolo-ios-app

Ultralytics YOLO iOS App source code for running YOLOv8 in your own iOS apps 🌟
https://ultralytics.com/yolo
GNU Affero General Public License v3.0
162 stars 29 forks source link

Is it possible to get a swiftUI implementation example instead of UIKIT. #18

Open ChrisRawstone opened 6 months ago

ChrisRawstone commented 6 months ago

Hi, Is it possible to get a swiftUI implementation example instead of UIKIT. Our Professor does not allow us to use UIKIT, because he argues that UIKIT has become too old and all industries are moving towards SwiftUI. Is it possible to get an example with SWIFTUI instead?

Best regards, Christian

pderrenger commented 6 months ago

Hi Christian,

We currently don't have a SwiftUI implementation example available in our documentation or repository. Most of our mobile-related examples are indeed based on UIKit due to its initial development period aligning more closely with UIKit's prevalence.

However, integrating our models into a SwiftUI project mostly involves working with backend processing, which can be similarly handled as in UIKit. The key difference would be in how you display the results within your SwiftUI views.

While we don't have a specific example to offer, you can use the Combine framework for handling asynchronous tasks and displaying results in SwiftUI. If your project involves displaying camera feeds or processing images, you might need to use UIViewControllerRepresentable to wrap UIKit components that handle these tasks, as SwiftUI still matures in these areas.

We understand the need for SwiftUI examples and appreciate your feedback. It's something we could look into for future updates. Meanwhile, consider exploring the bridge between SwiftUI and UIKit for camera and display functionalities.

Happy coding, and best of luck with your project! 🚀