More recently, my standard exchange code worked as expected. When the user canceled the Facebook share, SLComposeViewController.completionHandler returned SLComposeViewControllerResult. Canceled
Now, however, after updates made by Apple or Facebook (the changes include a new design to represent the layout), completeHandler always gets the Finish result .
I get the same behavior:
- iPhone 6s plus iOS 9.0.2 launch
- iPhone 6 plus launch of iOS 9.0.2
- iPhone 5s running iOS 8.2
Does anyone else have the same problem? Below is my code:
let fbComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
fbComposeViewController.addURL( NSURL(string:"http://www.some.url.com/)"))
fbComposeViewController.completionHandler = { (result:SLComposeViewControllerResult) -> Void in
switch result {
case SLComposeViewControllerResult.Cancelled:
print("Cancelled")
break
case SLComposeViewControllerResult.Done:
print("Done")
break
}
}
self.presentViewController(fbComposeViewController, animated: true) {
}