skip to Main Content

I would like to remove the following packages from my flutter app:

flutter_facebook_auth:
flutter_facebook_auth_platform_interface
flutter_facebook_auth_web

My app does not use Facebook auth. It is not enabled as one of the sign-in providers in the Firebase console. It is also not listed as a provider:

FlutterFireUIAuth.configureProviders([ const EmailProviderConfiguration(), const GoogleProviderConfiguration(clientId: googleClientId), const AppleProviderConfiguration(), ]);

I understand they may be installed by default as part of the firebase_auth package. Is there any way to remove them?

When running the app, I had previously received warnings related to FacebookAutoLogAppEventsEnabled and FacebookAdvertiserIDCollectionEnabled, and I have set both to false in the Info.plist file. Unfortunately, I still get those 3 facebook packages when running pod install or pod update.

I have already tried running flutter clean as well as deleting the podfile.lock file in the ios folder.

Much appreciated.

2

Answers


  1. here it says you need to install facebook plugin separately.

    try

    $ flutter pub cache repair
    
    $ flutter clean
    
    $ flutter pub get
    
    Login or Signup to reply.
  2. Follow these steps to remove the packages from the project:

    Step 1: Navigate to pubspec.yaml in your project root directory.

    Step 2: Remove the package name that you want to remove from the project.

    This section typically looks like this:

    dependencies:
      flutter:
        sdk: flutter
      package_name_to_remove: ^x.y.z
      ...
    
    

    Step 3: Now run the following command:

    For Android build:

    flutter clean
    flutter pub get
    

    For iOS build:

    • Ensure that you have set the FacebookAutoLogAppEventsEnabled and FacebookAdvertiserIDCollectionEnabled to false in your Info.plist file. It’s important to disable these settings to avoid Facebook-related warnings.

    • Delete Pods: Delete the Pods folder and the Podfile.lock file in the ios directory of your Flutter project.

    • Reinstall Pods: Run pod install in the iOS directory of your Flutter project to update the iOS dependencies:

    cd ios
    pod install
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search