1

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
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
rv123
  • 476
  • 1
  • 3
  • 14

0 Answers0