I use the following code to share an image, some text and a URL using a UIActivityViewController. Everything works fine, except that when use selects AirDrop, it gets "cannot receive all of these items at once." If I only share the image, then AirDrop works. I need text and URL for email, Facebook, Twitter sharing methods.
Is there a way to save the text and URL and make AirDrop only access the image, while Facebook, email, twitter sharing methods continue to use the text and URL along with the image I'm trying to use?
NSString *text = [NSString stringWithFormat:@"I made this image using %@ iOS app. Here is the link to download it:", [CloudHelper appName]]; NSURL *url = [NSURL URLWithString:APP_URL]; UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:@[text, url, myImage] applicationActivities:nil]; [self presentViewController:activityController animated:YES completion:nil];
source share