title: Facebook login is always cancel when user click on login button in ios 13.0 but it's totally working fine in ios 12.0 or smaller in swift
body: <p>Note : 
  It is working fine in ios &lt; 12.0 but when I run the application on the ios 13.0 then it shows the log in the console that "User cancelled login".</p>
  
  <p>I don't know what could be the reason for this. Can anyone help me?</p>
  
  <p>Maybe it can be ios 13.0 compatibility issue of facebook login. Here I attach a couple of my code's snippet with info.plist and pod specific version.</p>
  
  <p>Here is the code of Appdelegate.swift</p>
  
  <pre><code>
      func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -&gt; Bool {
  
      return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
  
      }
  
      func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -&gt; Bool {
              return FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: sourceApplication, annotation: annotation)
          }
  
  </code></pre>
  
  <p>info.plist</p>
  
  <pre><code>    &lt;key&gt;NSAppTransportSecurity&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;NSAllowsArbitraryLoads&lt;/key&gt;
              &lt;true/&gt;
              &lt;key&gt;NSAllowsArbitraryLoadsForMedia&lt;/key&gt;
              &lt;true/&gt;
              &lt;key&gt;NSAllowsArbitraryLoadsInWebContent&lt;/key&gt;
              &lt;true/&gt;
          &lt;/dict&gt;
  </code></pre>
  
  <p>This is the function, where I can handle the response "User cancelled login"</p>
  
  <pre><code>class func loginWithFacebook(controller: UIViewController, completionHandler: @escaping (_ result: Bool) -&gt; Void){
          //.. Code process
          let defaults = UserDefaults.standard
          if defaults.value(forKey: "FBToken") != nil
          {
              let jsonData : [String : Any] = defaults.value(forKey: "FBDict") as? [String : Any] ?? [String: Any]()
              print(jsonData)
  
              completionHandler(true) // return data &amp; close
          }
          else{
              let loginManager = LoginManager()
              loginManager.logIn(readPermissions: [ .publicProfile,.email,.userGender, .publicProfile, .userBirthday,
              ], viewController: controller) { loginResult in
  
                  switch loginResult {
                  case .failed(let error):
                      print(error)
                  case .cancelled:
                      print("User cancelled login.")
                  case .success(let grantedPermissions, let declinedPermissions, let accessToken):
                      print(grantedPermissions)
                      print(declinedPermissions)
                      print(accessToken)
                      Utility.getFacebookUserData(completionHandler: { (success) in
                          if success == true{
                              completionHandler(true)
                          }
                          else{
                              completionHandler(false)
  
                          }// return data &amp; close
                      })
  
                      break
                  }
              }
          }
      }
  </code></pre>
  
  <p>pod file have :</p>
  
  <pre><code>pod 'FBSDKCoreKit', '~&gt; 4.44.1'
  pod 'FBSDKLoginKit', '~&gt; 4.44.1'
  pod 'FacebookCore', '~&gt; 0.6.0'
  pod 'FacebookLogin', '~&gt; 0.6.0'
  pod 'FacebookShare', '~&gt; 0.6.0'
  </code></pre>
  
  <p>If you have any reference link then also share it here...</p>