Accidentally removed Flutter binary on macOS

dumazy

Fré Dumazy

Posted on February 7, 2020

Accidentally removed Flutter binary on macOS

I've accidentally removed a binary file named Flutter on my Mac via Storage Management.

Afterwards I ran into this issue:
The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/path/to/app/ios/Flutter/Flutter.framework)

How I've eventually fixed it:

  1. Fix Flutter SDK: Via a reinstall, but maybe changing channels and triggering a new build of the Flutter tool might work as well.
  2. Clean out the Cocoapods cache: pod cache clean --all
  3. Remove the Cocoapods cache directory: rm -rf "${HOME}/Library/Caches/CocoaPods"
  4. Repair the Pub cache: pub cache repair
  5. Start from a fresh checkout of the project. .packages should not be generated yet.
  6. flutter packages get
  7. Run (or build) the iOS app

Some of these steps probably aren't necessary or could be done in a better way, but this is what worked for me.
I just wanted to publish this in case it might help somebody in the future. That somebody might even be me.

If you've encountered the same issue before and was able to fix this, let me know how you did it :)

💖 💪 🙅 🚩
dumazy
Fré Dumazy

Posted on February 7, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related