when sharing the UIImage to the facebook/twitter getting the error
LaunchServices: invalidationHandler called
-(IBAction)ShareBtnClicked:(id)sender {
[self calculateInterstitialAdsCounts];
NSURL *fileURL;
docInteracCont.delegate = self;
//Save the Image to default Document directory
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:TEMP_PIC_NAME];
self.rawImage = _imageView.image;
BOOL prefs = [[NSUserDefaults standardUserDefaults ]boolForKey:WATERMARK_REMOVED];
if(!prefs)
{
self.rawImage = [Utility imageWithWaterMark:_imageView.image];
}
NSData *imageData = UIImageJPEGRepresentation(self.rawImage, 1.0);
[imageData writeToFile:savedImagePath atomically:false];
NSString *getImagePath = [documentsDirectory stringByAppendingPathComponent:TEMP_PIC_NAME];
fileURL = [[NSURL alloc] initFileURLWithPath:getImagePath];
// Open the Document Interaction controller for Sharing options (in Menu)
// docInteracCont = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
// [docInteracCont presentOpenInMenuFromRect:CGRectZero inView:self.view animated:true];
NSArray *objectsToShare = @[textToShare, fileURL];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypeCopyToPasteboard];
activityVC.popoverPresentationController.sourceView = self.view;
[self presentViewController:activityVC animated:YES completion:nil];
}
and not able to find why the error is caused. Deployment target 7.0 running on iPhone5 App is universal i.e. for both iPad and iPhone. Error is coming but images are still shared on facebook and i want to implement video Ads on the app and getting path how to implement it. plz share some idea