I am trying to share some items using UIActivityViewController. On iOS 6 it works fine. But when I test it on iOS 7 only mail icon shows up. In doubt that my SDK was too old I downloaded the most recent one, but it's still behaves the same. I tested on both simulator and a device with facebook installed on it, no luck.
Now I am running out of ideas what I do wrong.
Here is my code
- (void)shareButtonWasTapped:(BMPopUpMenuView *)popUpMenu {
NSString *shareText;
if (_correctPatternFound) {
shareText = @"Yey, I solved a puzzle!";
}
else {
shareText = @"I am solving a photzle...";
}
NSURL *shareURL = [NSURL URLWithString:@"http://somewebsite.com"];
NSArray *items = [NSArray arrayWithObjects:
shareText,
_shareImage,
shareURL, nil];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil];
[activityViewController setValue:shareText forKey:@"subject"];
activityViewController.excludedActivityTypes = @[UIActivityTypeCopyToPasteboard,
UIActivityTypePostToWeibo,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeCopyToPasteboard,
UIActivityTypeMessage,
UIActivityTypeAssignToContact,
UIActivityTypePrint];
[self presentViewController:activityViewController animated:YES completion:nil];
}