Reputation: 63
I was trying to share some text on Facebook
and Twitter
via my App. I searched and I found a piece of code to do that and it's doing well, however I can't understand the compiler response as it looks that there's something wrong.
the code is
NSArray *objectTOShare = @[_TweetTextView.text];
UIActivityViewController *activity = [[UIActivityViewController alloc]initWithActivityItems:objectTOShare applicationActivities:nil];
NSArray *excludeActivities = @[];
activity.excludedActivityTypes = excludeActivities;
[self presentViewController:activity animated:YES completion:nil];
As far as I can understand, as I excluded nothing so all the available options should appear like message and AirDrop for example. yet, only mail, facebook, and twitter only appear. Can any one explain to me why that happens.
Upvotes: 0
Views: 263
Reputation: 42977
There is More option(nearer to available activities) to enable other activities
Upvotes: 1
Reputation: 963
It's normal those are the only available options on a Simulator, try running it in a real device and you should get message and Airdrop...
Upvotes: 1