I have a test code and it works great for me. I am using iPod5 touch and iOS 7.1.2 I have a small suggestion. Try calling with a delay code. as:
[self performSelector:@selector(shareActivityView) withObject:nil afterDelay:0.5];
Your shareActivityView method is as follows:
-(void)shareActivityView
{
NSURL *url =[NSURL URLWithString:@"google.com"];
UIImage *img = [UIImage imageNamed:@"myImage"];
NSMutableArray *ar2 = [NSMutableArray arrayWithObjects:UIActivityTypePostToWeibo, UIActivityTypeSaveToCameraRoll, UIActivityTypeMessage, UIActivityTypePrint, UIActivityTypeAssignToContact, nil];
NSArray *itemsToShare = @[textToShare,url];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];
[activityVC setValue:@"Sample - Share" forKey:@"subject"];
activityVC.excludedActivityTypes = ar2;
[self presentViewController:activityVC animated:YES completion:NULL];
}
This is strange, but sometimes it works.
source
share