The sandbox is not in sync with the Podfile.lock

This is a common error when running on iOS or macOS after installing new packages:

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation

Steps to try#

flutter pub get

# From the root of the project folder:
cd ios
pod install
pod update

# Or likewise if you want to fix this for macOS:
cd macos
pod install
pod update

If this still does not work, you can also try a full clean:

# From the project root:
flutter clean

cd ios
rm Podfile.lock
rm -rf Pods/
pod install
pod update

More info here:

Also see the steps in this answer to this thread: