I am currently using the UIDocumentInteractionController for public functions. When it opens, a list of all applications on the device that can process this type of file is displayed.
Is there a way to disable my application sending a document to certain applications, even if they support this type of file? For example, if I have a PDF file open in my application and iBooks is on the iPad, if I touch the iBooks icon in the UIDocumentInteractionController, I donβt want it to send it to the application.
Ideally, I see this as creating a black list (or white list). For example, it would be great to do this:
- (void) documentInteractionController: (UIDocumentInteractionController *) controller willBeginSendingToApplication: (NSString *) application { // if app is blacklisted if ([application isEqualToString:@"com.schimera.WebDAVNavigator"]) { [self.interactionController dismissMenuAnimated:YES]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"FAIL" message:@"NO" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; return } }
However, the document is still sent to the application, even if it is black.
Is such an approach possible?
Hooray!
source share