I want to disable copy/cut menu of text area to prevent export any data from application. I put following code in apps/<AppName>/iphone/native/Classes/CDVMainViewController.m
file, but it didn't work. It seems canPerformAction is called when a menu appears, but cut/copy actions are not passed to this code.
-(BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
BOOL can = [super canPerformAction:action withSender:sender];
if (action == @selector(cut:) || action == @selector(copy:))
{
can = NO;
}
NSLog(@"%@ for action:%@ from sender:%@.",
can ? @"YES" : @"NO", NSStringFromSelector(action), sender);
return can;
}
How can I disable these options?