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
here it says you need to install facebook plugin separately.
try
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:
Step 3: Now run the following command:
For Android build:
For iOS build:
Ensure that you have set the
FacebookAutoLogAppEventsEnabled
andFacebookAdvertiserIDCollectionEnabled
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 thePodfile.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: