1
SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
        controller.view.hidden = YES;
        [self presentViewController:controller animated:NO completion:^{
            [controller.view endEditing:YES];
        }];

此代码在 iOS6 和 iOS7 中运行良好,但在 iOS 8 中崩溃:

**2014-09-03 08:48:19.545 [1254:248164] Error: The operation couldn’t be completed. (com.apple.accounts error 6.)
2014-09-03 08:48:19.558[1254:248164] Discovered extensions: {(
 <NSExtension: 0x17013eaa0> {id = com.apple.share.SinaWeibo.post},
 <NSExtension: 0x17013ee60> {id = com.apple.share.Facebook.post},
 <NSExtension: 0x17013ebe0> {id = com.apple.share.Twitter.post},
 <NSExtension: 0x17013f400> {id = com.apple.share.TencentWeibo.post},
 <NSExtension: 0x17013e780> {id = com.apple.share.Vimeo.post},
 <NSExtension: 0x17013e6e0> {id = com.apple.share.Flickr.post},
 <NSExtension: 0x17013e640> {id = com.apple.mobileslideshow.StreamShareService}
)} for attributes: {
 NSExtensionPointName = "com.apple.share-services";
}**

获取 :: 的错误消息**LaunchServices: invalidationHandler called**

4

2 回答 2

1

这不是解决方案,您需要升级 iOS8 和 Xcode 6.0.1 的 Facebook 版本,这将适用于 iOS7 和 iOS8+。

于 2014-10-01T06:59:28.660 回答
0

我在 iOS8 中获得了该问题的解决方案 controller.view.hidden = YES;,在 iOS8 默认设置警报视图中隐藏在视图中,我将这个简单的代码用于 iOS7 和 iOS8

if (!SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
        controller.view.hidden = YES;
else
    controller.view.hidden = NO;
于 2014-09-05T09:34:30.343 回答