I looked through a bunch of posts here, numerous online tutorials / code examples, and I'm at a standstill. In my application, I have no problem displaying the UIActivityController originally provided by iOS7 with the sharing settings appropriate for my application (AirDrop and mail).
The specific problem that I encountered is that my saved document is attached to an email when the user selects the option to exchange by mail. The body of the message is text-tuned, but the attachment is MIA. Relevant Code:
// Create an XML file that will be used for the currently displayed record ... NSURL * url = [self createShareFile];
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:@[@"Data shared from my app.", url] applicationActivities:nil];
controller.excludedActivityTypes = @[UIActivityTypePostToTwitter, UIActivityTypePostToFacebook,
UIActivityTypePostToWeibo,
UIActivityTypeMessage,
UIActivityTypePrint, UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList, UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo, UIActivityTypePostToTencentWeibo];
[self presentViewController:controller animated:YES completion:nil];
? , NSURL .
!