title: Login with facebook error on iOS in flutter project
body: <p>I wrote a flutter login with facebook app.</p>
  
  <p>It works correctly on Android.
  On iOS simulator and on real iPhone device it does not work. Both having iOS 13.2.</p>
  
  <p>pub spec.yaml file</p>
  
  <pre><code>  firebase_auth: ^0.6.6
    flutter_facebook_login: ^1.1.1
    flutter_auth_buttons: ^0.3.1
  </code></pre>
  
  <p>main.dart file</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:firebase_auth/firebase_auth.dart';
  import 'package:flutter_facebook_login/flutter_facebook_login.dart';
  import 'package:flutter_auth_buttons/flutter_auth_buttons.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatefulWidget {
    @override
    State&lt;StatefulWidget&gt; createState() {
      return _MyAppState();
    }
  }
  
  class _MyAppState extends State&lt;MyApp&gt; {
    FirebaseAuth _auth = FirebaseAuth.instance;
    bool isLogged = false;
    FirebaseUser myUser;
  
    Future&lt;FirebaseUser&gt; _loginWithFacebook() async {
      var facebookLogin = new FacebookLogin();
      var result = await facebookLogin.logInWithReadPermissions(['email']);
      debugPrint(result.status.toString());
      if (result.status == FacebookLoginStatus.loggedIn) {
        FirebaseUser user =
            await _auth.signInWithFacebook(accessToken: result.accessToken.token);
        return user;
      }
      return null;
    }
  
    void _login() {
      _loginWithFacebook().then((response) {
        if (response != null) {
          myUser = response;
          setState(() {
            isLogged = true;
          });
        }
      });
    }
  
    void _logout() async {
      await _auth.signOut().then((response) {
        setState(() {
          isLogged = false;
        });
      });
    }
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Login App',
        home: Scaffold(
          appBar: AppBar(
            title: Text(isLogged ? 'Profile Page' : 'Login App'),
            actions: &lt;Widget&gt;[
              IconButton(
                onPressed: _logout,
                icon: Icon(Icons.power_settings_new),
              )
            ],
          ),
          body: Center(
            child: isLogged
                ? Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: &lt;Widget&gt;[
                      Text('Name: ' + myUser.displayName),
                      Image.network(myUser.photoUrl),
                    ],
                  )
                : FacebookSignInButton(
                    onPressed: _login,
                  ),
          ),
        ),
      );
    }
  }
  </code></pre>
  
  <p>I added the plist file in the Xcode project correctly. And configured the iOS version of the Facebook developer correctly based on the following steps:
  <a href="https://developers.facebook.com/docs/facebook-login/ios" rel="nofollow noreferrer">https://developers.facebook.com/docs/facebook-login/ios</a></p>
  
  <p>I changed the project workspace settings in Xcode between Legacy build and new build system. I still get error.</p>
  
  <p>I tried to add the following to the pod file, and still get error</p>
  
  <pre><code>pod 'FBSDKCoreKit', '~&gt; 4.44'
  </code></pre>
  
  <p>And even all proposed solutions in here
  <a href="https://stackoverflow.com/questions/55986325/how-to-fix-build-error-with-fbsdkloginkit-in-xcode">How to fix build error with FBSDKLoginKit in Xcode</a></p>
  
  <p>The error that I get is</p>
  
  <pre><code>No known class method for selector 'dictionary:setObject:forKey:'
  </code></pre>
  
  <p>I also tried to change the Firebase version and the Facebook Flutter login version in pub spec file (between 1.1.1 and 1.2.0 because I do not want to use AndroidX) but still getting the error.</p>
  
  <p>Note that I updated Xcode to latest version, and error was not fixed.</p>
  
  <p>I changed the iOS deployment version in Xcode for all pods to version 8. And error not fixed!</p>