12

I can't share anything via linkedin using UIActivityViewController. While I tap share via linkedin, it opens the sharing pop up and dismisses immediately after opened it. All other sharing are working fine. Could you please tell me a solution? Thanks.

Note: my project is in ios9 and xcode version is 7

and my error log shows : plugin com.linkedin.LinkedIn.ShareExtension interrupted

Puck
  • 2,080
  • 4
  • 19
  • 30
Mumthezir VP
  • 6,251
  • 6
  • 28
  • 57
  • 2
    I'm also having this problem. Ideally I would be able to share a UIImage, NSUrl, and NSString. I've tried returning nil for each or all of these for the case of LinkedIn to no avail. – Kaolin Fire Nov 16 '15 at 07:21
  • @Mumthezir have you resolved this issue? – iApple Nov 30 '15 at 09:34
  • @Mumthezir hey, I dont even see linkedin on my UIActivityViewController, did you implement a custom activityType? – DaNLtR Jan 04 '16 at 12:01

2 Answers2

4

The iOS 8 extensions cannot be presented in a custom share screen. You absolutely have to use UIActivityViewController in order for the share/action extensions to appear.

0

Have you written the code like this

DataItemProvider *dataToShare = [[DataItemProvider alloc] initWithPlaceholderItem:FileTypeToShare];

LinkedInActivityType *linkedinActivity = [[LinkedInActivityType alloc] init];

NSArray *activityTypes = @[linkedinActivity];
NSArray *activityItems = @[dataToShare];

UIActivityViewController *activityController = [[UIActivityViewController alloc]initWithActivityItems:activityItems applicationActivities:activityTypes];

[activityController setCompletionHandler:^(NSString *activityType, BOOL completed) {
    //Put in your completion handle code here.
}];

[self presentViewController:activityController animated:YES completion:nil];
Jay Bhalani
  • 4,142
  • 8
  • 37
  • 50
Uma Madhavi
  • 4,851
  • 5
  • 38
  • 73