Reputation: 6551
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
Upvotes: 12
Views: 1073
Reputation: 121
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.
Upvotes: 4
Reputation: 4917
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];
Upvotes: 0