I am rewriting an iOS app in SwiftUI trying to comply with the dictates of clean architecture, I am new to this approach so I have some doubts.
Some screens need to have the Dailymotion video player, preferably treated as a singleton so it can be shared with each one once it is instantiated.
DailymotionSDK exposes a method called “create” that returns a DMPlayerView type (subclass of UIView), a view that contains the actual player.
What is a possible strategy to have the components separate?
In the courses I have taken so far it has almost always been about CRUD operations leveraging perhaps a repository but my case is a bit different
Initially I thought about writing the use case but the return type of the “execute” method would be DMVideoPlayerView and I would then create a dependency with DailymotionSDK.
Then I thought about moving the Dailymotion logic into a service but, again, I can’t come up with it.