2

I've tried building a share intent for my iOS application but only the message and email share buttons appear, I want it to show everything that can send the link like in android it shows everything from facebook, twitter, whatsapp, messenger etc.

Im using this code

NSString *textToShare = [NSString stringWithFormat:@"www.njoftime.io/%@",[[NjoftimeManager getSelectedListing] objectForKey:@"_id"]];
NSArray *itemsToShare = @[textToShare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities: nil];
activityVC.excludedActivityTypes = @[UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll]; //or whichever you don't need
[self presentViewController:activityVC animated:YES completion:nil];

I've seen some questuons here and some say either you share directly to facebook or this way.

Any idea?

Elgert
  • 470
  • 2
  • 5
  • 19

2 Answers2

1

Try to use ShareKit.

Supported Services:

Delicious, Email, Facebook, Google Reader, Instapaper, Pinboard, Read It Later, Tumblr, Twitter, and much more.

Mutawe
  • 6,464
  • 3
  • 47
  • 90
1

With iOS 8 you will have something similar to Android Intents. Use App Extensions.

If you want to use in ios6 & ios7 then use sharekit.

I am not sure sharekit is working or not but you can give it a try.

Maulik shah
  • 1,664
  • 1
  • 19
  • 45