I want to find the app to which user has shared through the iOS share panel. For this I am implementing the UIDocumentInteractionControllerDelegate method documentInteractionController:willBeginSendingToApplication:
-(IBAction) onOpenWithClicked:(id)sender
{
NSURL* savedURL = [self getURL];
self.interactionController = [UIDocumentInteractionController interactionControllerWithURL:savedURL];
self.interactionController.delegate = self;
[self.interactionController presentOpenInMenuFromRect:self.openWithButton.frame
inView:self.shareView
animated:YES];
}
- (void)documentInteractionController:(UIDocumentInteractionController *)controller willBeginSendingToApplication:(NSString *)application
{
NSLog(@"Sharing to application %@", application);
}
But the issue is that this delegate method is not getting called when user shares to an app's share extension. However, it does gets called when user shares to the main app in the share panel
Please let me know if there is any other way to find which app's share extension is used by the user in the iOS share panel