title: Swift 5 IOS facebook share dialog, is not showing on my app
body: <p>I have one week trying to show the shareDialog from facebook, but nothing works fine,
  my button for login is working, my work in Android is working fine, but IOs is not working, I have install my SDK from Facebook, I put all the folders Bolt in to the proyect, but nothing seems to work for me, I already made the migration for facebookSDK <a href="https://github.com/facebookarchive/facebook-swift-sdk/blob/master/MigrationGuide.md" rel="nofollow noreferrer">https://github.com/facebookarchive/facebook-swift-sdk/blob/master/MigrationGuide.md</a></p>
  
  <p>and doesnt work to, what im doing wrong, here is my AppDelegate.swift:</p>
  
  <pre><code>import UIKit
  import FBSDKCoreKit
  
  @UIApplicationMain
  class AppDelegate: UIResponder, UIApplicationDelegate {
  
      func application(
          _ application: UIApplication,
          didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
      ) -&gt; Bool {
          // Override point for customization after application launch.
  
          ApplicationDelegate.shared.application(
              application,
              didFinishLaunchingWithOptions: launchOptions
          )
          return true
      }
  
      func application(
          _ app: UIApplication,
          open url: URL,
          options: [UIApplication.OpenURLOptionsKey : Any] = [:]
      ) -&gt; Bool {
          return ApplicationDelegate.shared.application(
              app,
              open: url,
              options: options
          )
      }
      func applicationDidBecomeActive(_ application: UIApplication) {
          AppEvents.activateApp()
      }
  
  
  
      // MARK: UISceneSession Lifecycle
  
      func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -&gt; UISceneConfiguration {
          // Called when a new scene session is being created.
          // Use this method to select a configuration to create the new scene with.
          return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
      }
  
      func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set&lt;UISceneSession&gt;) {
          // Called when the user discards a scene session.
          // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
          // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
      }
  
  
  }
  </code></pre>
  
  <p>and here is the ViewController.swift:</p>
  
  <pre><code>import UIKit
  import FBSDKLoginKit
  import FBSDKShareKit
  
  
  class ViewController: UIViewController {
  
      @IBAction func ShareButton(_ sender: Any) {
          let alert = UIAlertController(title : "Comparte", message:"Comparte con amigos", preferredStyle: .actionSheet)
  
          let actionOne = UIAlertAction(title: "Comparte en facebook", style: .default) { (UIAlertAction) in
  
              let sharePhoto = SharePhoto()
              sharePhoto.imageURL = URL(string: "https://www.hola.com/imagenes/actualidad/20171204102954/adelanto-portada-revista-hola/0-514-626/adelanto-hola1-t.jpg")
  
              let content = SharePhotoContent()
              content.photos = [sharePhoto]
  
              self.showShareDialog(content)
  
          }
          alert.addAction(actionOne)
  
         self.present(alert, animated: true, completion: nil)
  
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let loginButton = FBLoginButton(permissions: [ .publicProfile ])
          loginButton.center = view.center
  
          view.addSubview(loginButton)
          // Do any additional setup after loading the view.
      }
  
       func showShareDialog&lt;C: SharingContent&gt;(_ content: C, mode: ShareDialog.Mode = ShareDialog.Mode.automatic) {
          let dialog = ShareDialog(fromViewController: self, content: content, delegate: self as? SharingDelegate)
              dialog.mode = mode
  
              dialog.show()
      }
  
       func sharer(_ sharer: Sharing, didCompleteWithResults results: [String: Any]) {
          print("success")
  
          let title = "Share Success"
          let message = "Thank You"
          let alertController = UIAlertController.init(title: title, message: message, preferredStyle: UIAlertController.Style.alert)
          self.present(alertController, animated: true, completion: nil)
  
  
      }
  
      func sharer(_ sharer: Sharing, didFailWithError error: Error) {
          print("error")
  
          let title = "Share Failed"
          let message = "Something went wrong. Please try again"
          let alertController = UIAlertController.init(title: title, message: message, preferredStyle: UIAlertController.Style.actionSheet)
          self.present(alertController, animated: true, completion: nil)
      }
  
      func sharerDidCancel(_ sharer: Sharing) {
          print("canceled")
  
          let title = "Share Cancelled"
          let message = "Share on Facebook was Cancelled"
          let alertController = UIAlertController.init(title: title, message: message, preferredStyle: UIAlertController.Style.alert)
          self.present(alertController, animated: true, completion: nil)
      }
  
  
  }
  ```
  
  </code></pre>