Can you show the code where you set the mask ?
Usually, is is an OptionSet, so assigned such as [UIEventButtonMaskPrimary, UIEventButtonMaskSecondary] (that not's the exact names)
old school Objecive C
gesture.buttonMaskRequired = (UIEventButtonMaskPrimary | UIEventButtonMaskSecondary);
I have since made progress - but it feels real hacky.
Create 2 tap gesture recognisers - one with primary mask set, and the other with secondary mask set. I then kill the secondary gesture in the gestureRecognizerShouldBegin: delegate call if the UITouch type is UITouchTypeDirect so as to stop use getting 2 tap events with a finger.