Rive to UIImage (Swift/SwiftUI)

I need to take snapshots of the rive animation with its current state and transform it into an UIImage.

For what i understand rive is using Metal which works in a lower level than the one im working one when rendering my view. So my attempts to capture the snapshot return as either a transparent pngData or nothing at all.

Also my rive animation has some setInputs which colorize, based on its value.

I also would like to capture this in a way that i can mirror the rive animation not just capture a single frame but instead capture multiple frames along the time, basically mirroring.

In my attempts i tried to use RiveRenderer but I ended up having linking issues. And sometimes being unable to resolve code during compilation runtime taking forever to compile just to fail in the end.

Can anyone help me with a snippet or so how to fetch the snapshot from the RiveView or Viewmodel to an UIImage?