3

I ran into a problem lately. The UITapgesture working on simulator perfect and even while debugging directly on the device (iPhone 4, iOS 5.0.1) but when I package the app (Dep_Target iOS4.0m Base_SDK iOS5.1(latest)) for adhoc distribution and send it to client the gestures doesn't work. I then installed the build via test flight on the same device which I am using for debugging, the gesture doesn't work on it. I rechecked everything, I am using same build for distribution. Any help will be much appreciated. Thanks

EDIT:
after doing a bit debugging it turns out that UITapgesture is not the culprit. The gesture method is getting fired but I've used a UIMenuController inside the gesture. The menu controller gets instantiated and all but not gets displayed on view. Besides the method:

- (BOOL) canPerformAction:(SEL)selector withSender:(id) sender  

is not getting fired too. Do remember this all is happening in the build which is distributed via test flight, otherwise everything runs perfect.

Ahmed
  • 772
  • 1
  • 9
  • 26

1 Answers1

3

I was getting this issue in one of my application and writing
[self becomeFirstResponder]
at the very first line in the function (i.e. before the line [[UIMenuController alloc] init]) solved my problem.

Pankaj
  • 76
  • 4
  • One should override `canBecomeFirstResponder` instead of doing this, as I tried both methods and this one didn't work for me while overriding `canBecomeFirstResponder` did work. – vrwim May 12 '15 at 12:49