macCatalyst TapGesture(count: 2) on a UIViewRepresentable's UIImageView

This is awkward. So I have my app that I have shipped on iOS, that works properly there. I have a gesture recognizer on the double-tap .gesture(TapGesture(count: 2)).

This is on top of an image, that needs to be in UIImageView() through an UIViewRepresentable (because SVG and Image will not scale it properly, using the prerendered version instead).

Now, if I put a .gesture(TapGesture()) instead, it works well. If I put a DragGesture(), it gets picked up immediately. But I cannot have the system detect the double-tap to save my life.

I tried going inside the UIViewRepresentable, adding a #selector, but it will not get it. I tried overriding the touchesEnded globally, and it will not work either.

I also tried sequencing TapGesture() to TapGesture(count:2) and it (incredibly) sometimes works, but something will make it stop working, so it's not reliable.

It might be because of my scene too, it's really complex, something might interfere, but I have not found a way to debug the scene to know where the events are being sent off, know what interferes with what. And remember, it works perfectly on iOS, and it also works well with a normal SwiftUI Image.

contentShape doesn't seem to have a result with that issue either. And again, putting a drag or a single tap works perfectly. It's just the double-tap that seems to fail me.

Fixing it is something, but I'm also very curious on the way to debug such issues.

Thank you!
macCatalyst TapGesture(count: 2) on a UIViewRepresentable's UIImageView
 
 
Q