Use GroupActivities with Objective-C Classes?

Viewed 191

So the new SharePlay on iOS 15 works by utilizing GroupActivities which are only available in Swift. My existing app has a fairly extensive bit of code for viewing videos, but that code is all Objective-C.

If I want to get SharePlay to work with this app, am I going to have to convert all that to Swift, or is it possible to pass the AVPlayer stuff back and forth?

Can GroupActivity be in its own class and receive the data from the Objective-C file that parses the video file in question?

1 Answers

If you want to use the playbackCoordinator of the AVPlayer class, you'll have to call the coordinateWithSession() via Swift. This doesn't mean you have to convert all of your existing classes to Swift, what about creating a Swift extension of your Objective-C class for the coordination ?

Related