Currently my app has an option to share on Facebook and Twitter using SLComposeViewController.
SLComposeViewController *fbComposeViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[fbComposeViewController setInitialText:text_short];
[fbComposeViewController addURL:url];
[self.navigationController presentViewController:fbComposeViewController
animated:YES
completion:^{
NSLog(@"fb activity completed");
}];
I can share to other sites like Gmail, Whatsapp, Message and Mail using
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:@[text, url]
applicationActivities:nil];
controller.excludedActivityTypes = @[UIActivityTypePostToWeibo,
UIActivityTypePrint,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList,
UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo,
UIActivityTypePostToTencentWeibo,
UIActivityTypeAirDrop,
UIActivityTypePostToFacebook,
UIActivityTypePostToTwitter
];
[self presentViewController:controller animated:YES completion:nil];
However this launches a share sheet where user has to select an app he has to launch. Is there any way to directly launch the sharing dialog by specifying the activity name? For example, Whatsapp, Email and text invites in Uber.