1

iOS 7, Xcode 5

I've setup a UIActivityController in my app and no matter what I do, I can't ever see the icons for Twitter, Facebook, etc. I only see Mail and Message. This happens both in the Simulator and on my iPhone 5S.

I've tried third-party tutorials and sample code and get the same behavior. However, when I use Safari/Yahoo on my iPhone, I can see everything, even though I do not have accounts for everything.

The code is straightforward:

NSString *text = @"How to add Facebook and Twitter sharing to an iOS app";
NSURL *url = [NSURL URLWithString:@"http://roadfiresoftware.com/2014/02/how-to-add-facebook-and-twitter-sharing-to-an-ios-app/"];
UIImage *image = [UIImage imageNamed:@"roadfire-icon-square-200"];

UIActivityViewController *controller =
[[UIActivityViewController alloc]
 initWithActivityItems:@[text, url, image]
 applicationActivities:nil];
[self presentViewController:controller animated:YES completion:nil];

My understanding is that I do NOT need to have active accounts on any device to simply see the icons in the Sheet.

So can someone help figure out why this is happening?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
wayneh
  • 4,393
  • 9
  • 35
  • 70
  • I think you do have to be logged in to see Facebook or twitter. I ran your code and it does not show fb and tw. Check this out http://stackoverflow.com/questions/18956620/facebook-twitter-icon-not-showing-in-uiactivityviewcontroller-on-ios7 – Yan Jun 11 '14 at 15:16
  • If this is the case, does anyone know why I can see them on my iPhone in Safari/Yahoo? Doesn't make any sense.... – wayneh Jun 11 '14 at 18:04
  • You don't have to be logged in to another account, however, the accounts must be set up on your device for iOS to show their icons. – wayneh Jul 08 '14 at 16:17

0 Answers0