0

I have implemented Facebook sharing in my app. But When composerview is opened and i tapped on post, after that it will block my app. I am not able to navigate to other view controller. Here is the code that i have used:

    SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

    SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){
        if (result == SLComposeViewControllerResultCancelled) {

        } else {

        }

        [controller dismissViewControllerAnimated:YES completion:Nil];
    };

    controller.completionHandler = myBlock;

    [controller setInitialText:strMsg];

    [vc presentViewController:controller animated:YES completion:Nil];
Kirti Parghi
  • 1,142
  • 3
  • 14
  • 31
  • When i do debugging, it comes to completion hanlder in iOS 7.2 but when i run my app in device with OS 8.3, completion hanlder is not called. – Kirti Parghi May 13 '15 at 11:18

1 Answers1

0

I faced the same issue and debugged as well. In my case it was not a hang; after the SLCompeseViewController disappeared (moved up the screen) there were some UIViews, UIControls remaining on the controller.view which hinder user interaction (i think it is the same in your app).

If it is the same case, you will never be able to remove those Views because the completion handler is never called.

This is a bug in iOS8, here is the link.

https://developers.facebook.com/bugs/962985360399542/?search_id

I suggest you to use UIActivityViewController instead of SLComposeViewController.

antonio
  • 722
  • 11
  • 22