在尝试共享帖子时,LinkedIn共享无法在UIActivity视图控制器(没有SDK)中运行。 LinkedIn帖子正在崩溃,我收到了像LinkedIn:plugin com.linkedin.LinkedIn.ShareExtension失效的崩溃日志
NSArray *items = @[shareContentHeadingString,shareUrl];
activityViewController = [[UIActivityViewController alloc]
initWithActivityItems:items applicationActivities:nil];
NSArray *excludeActivities = @[UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo,
UIActivityTypePostToWeibo];
activityViewController.excludedActivityTypes = excludeActivities;
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")){
activityViewController.popoverPresentationController.sourceView = self.view;
}
if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
{
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
sharePopOverController = [[UIPopoverController alloc] initWithContentViewController:activityViewController];
shareRect = CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/2, 1, 1);
sharePopOverController.delegate = self;
[sharePopOverController presentPopoverFromRect:shareRect inView:self.view permittedArrowDirections:0 animated:YES];
}
else{
[self presentViewController:activityViewController animated:YES completion:nil];
}
}
else{
[self presentViewController:activityViewController animated:YES completion:nil];
}
答案 0 :(得分:0)
我遇到了同样的问题。然后我删除了URL和Image,只将字符串值传递给LinkedIn。它起作用了。