I am having an issue with the UIActivityViewController on my apps since I updated to iOS 8.3. Twitter, Mail, and Messages displays fine, but Facebook is not there. I have checked my code to ensure that I didn't accidentally list it in an excluded activity, and made sure I am signed in on Facebook within my phone settings. I can verify that it works on simulator, but not in my phone. Any ideas what may be going on here?
UPDATE
Somehow, it is related to the Facebook app itself. If I remove Facebook from my iPhone, the option to share via Facebook comes back. If I reinstall the Facebook app, I can no longer share to Facebook. Any ideas why this is doing it?
-(IBAction) invite {
NSCalendar* gregorian = [[[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar] autorelease];
NSDateComponents* theDateComponents = [gregorian components: NSWeekdayCalendarUnit fromDate: [NSDate date]];
NSInteger weekDay = theDateComponents.weekday;
if ( weekDay == 1 || weekDay >= 5 ) {
NSString *invitation = @"Join me @ Fritch Church of Christ Sunday! Bible Class @9:45AM Worship @10:45AM & 6:00PM!";
NSArray *activityItems = @[invitation];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes = @[ UIActivityTypePostToWeibo,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact,
UIActivityTypePrint ];
if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
{
UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:activityVC];
[aPopover presentPopoverFromRect:[invite frame] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
}
else {
[self presentViewController:activityVC animated:YES completion:nil];
}
}
else {
NSString *invitation = @"Join me @ Fritch Church of Christ this Wednesday! Devotional & Bible Class @7!";
NSArray *activityItems = @[invitation];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes = @[ UIActivityTypePostToWeibo,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact,
UIActivityTypePrint ];
if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
{
UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:activityVC];
[aPopover presentPopoverFromRect:[invite frame] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
}
else {
[self presentViewController:activityVC animated:YES completion:nil];
}
}
}
From simulator
From actual iPhone (both are signed into Facebook)