rv123
rv123

Reputation: 476

SLComposeViewController error => LaunchServices: invalidationHandler called

I'm integrating social sharing in my SpriteKit game (iOS 8 + Swift). Everything is working correctly, but I get the following error: "LaunchServices: invalidationHandler called". Any idea how to fix the error? This is my code:

func shareWithFacebook() {

    if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook) {
        let facebookSheet = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
        facebookSheet.setInitialText("Test FB post with score of \(score)")
        self.presentViewController(facebookSheet, animated: true, completion: nil)
    } else {
        println("facebook not available")
    }

}

I've tried also adding a sourceView before presenting the ViewController, but still get the error...

facebookSheet.popoverPresentationController?.sourceView = self.view

Upvotes: 1

Views: 352

Answers (0)

Related Questions