HomeiOS Developmentswift - Clear structure iOS SwiftUI - The best way to combine...

swift – Clear structure iOS SwiftUI – The best way to combine DailymotionSDK video participant correctly


I’m rewriting an iOS app in SwiftUI attempting to adjust to the dictates of unpolluted structure, I’m new to this method so I’ve some doubts.

Some screens have to have the Dailymotion video participant, ideally handled as a singleton so it may be shared with each as soon as it’s instantiated.

DailymotionSDK exposes a technique known as “create” that returns a DMPlayerView sort (subclass of UIView), a view that accommodates the precise participant.

What’s a doable technique to have the elements separate?

Within the programs I’ve taken up to now it has virtually at all times been about CRUD operations leveraging maybe a repository however my case is a bit completely different

Initially I considered writing the use case however the return sort of the “execute” technique could be DMVideoPlayerView and I might then create a dependency with DailymotionSDK.

Then I considered transferring the Dailymotion logic right into a service however, once more, I can not provide you with it.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments