I have trouble when sharing a text to Facebook using SLComposerViewController
or UIActivityViewController
. When users press the done button the app freezes if there is no internet connection. It only happens with Facebook, other services are ok.
I'm using Xcode 6.4 and it happens on iOS 8.3 and 8.4.
SLComposeViewController* vc = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[vc setInitialText:name];
[vc addURL:[NSURL URLWithString:link]];
vc.completionHandler = ^(SLComposeViewControllerResult result) {
if (result == SLComposeViewControllerResultCancelled) {
refSelf.shareFailed(@"");
}
else {
refSelf.shareSuccess();
}
};
[[self getRootViewController] presentViewController:vc animated:YES completion:nil];