Mina
Mina

Reputation: 63

Share using UIActivityController with more available options

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.

The App response

Upvotes: 0

Views: 263

Answers (2)

Anil Varghese
Anil Varghese

Reputation: 42977

There is More option(nearer to available activities) to enable other activities
enter image description here

Upvotes: 1

MAB
MAB

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

Related Questions