Im using UIActivityViewController to show share. In the list when i select Mail app the subject and body is set properly and where as in Gmail app its empty.
- (void)shareAVideoWithSubject:(NSString*)subject Link:(NSString *)string onViewController:(UIViewController *)viewController fromView:(UIView *)view {
_activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:@[string]
applicationActivities:nil];
_activityViewController.excludedActivityTypes = @[UIActivityTypePrint, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, UIActivityTypeAddToReadingList, UIActivityTypeAirDrop];
[_activityViewController setValue:subject forKey:@"subject"];
UIWindow *window = [[[UIApplication sharedApplication] delegate]window];
//if iPhone
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
if(!viewController){
viewController = ((SWRevealViewController*)window.rootViewController).presentedViewController;
}
[viewController presentViewController:_activityViewController
animated:YES
completion:nil];
}
//if iPad
else
{
// Change Rect to position Popover
popup = [[UIPopoverController alloc] initWithContentViewController:_activityViewController];
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithCustomView:view];
[popup presentPopoverFromBarButtonItem:barButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
}
I have check the below two questions on StackOverFlow.
These are not answer to my question because they add up new activity in list, rather i want the iOS shows the all shareable apps. In that case Gmail share body is going empty.
Thanks in advance.
Adding the screenshots,