Flutter iOS "ld: framework not found Flutter"

Error: ld: framework not found Flutter

Solution:

  1. Ensure that you have properly installed Flutter and set up your Flutter project according to the official documentation.
  2. Make sure you have the latest version of Flutter SDK installed by running flutter upgrade in your terminal.
  3. Check if you have added the necessary dependencies to your Flutter project's pubspec.yaml file.
  4. If you recently updated Flutter, try running flutter clean followed by flutter pub get to clear the build cache and fetch dependencies again.
  5. Verify that you have the correct configuration in your iOS project.
  6. Ensure that you have opened your Flutter project in Xcode by running open ios/Runner.xcworkspace from your project directory.
  7. In Xcode, make sure your project's deployment target matches your Flutter version requirements. You can adjust this in the project settings under the "General" tab.
  8. Check if there are any missing or misconfigured frameworks in your Xcode project settings. Make sure that the Flutter framework is included and properly linked.
  9. If you're using CocoaPods for dependency management, ensure that your Podfile is correctly configured and that you have run pod install to install dependencies.
  10. If the error persists, try restarting your development environment, including closing and reopening your IDE and terminal.
  11. Consult the Flutter documentation, GitHub issues, or relevant forums for any known issues or troubleshooting tips related to your specific setup.

If you need to upgrade packages according to your iOS deployment target and Flutter SDK version, try the following steps:

  1. Run flutter clean.
  2. Run flutter pub get.
  3. Remove xcode derived data - check this link.
  4. Remove the Pods folder from the project iOS folder.
  5. Remove the Podfile.lock file from the project iOS folder.
  6. Remove the project.workspace file.
  7. Run the project again on the iOS platform.

Try the following steps:

  1. Delete the Flutter SDK.
  2. Download the same Flutter SDK again and reinstall it.
  3. Restart Android Studio.

It should work well after completing these steps.

I tried the following:

flutter upgrade
flutter run

And boom! Build succeeded!

To upgrade your Flutter, execute the following command:

flutter upgrade

This command will upgrade the Flutter engine and download necessary tools. It will also kill any active Flutter daemons.

After the upgrade is complete, run your application again using:

flutter run
"Error "ld: framework not found Flutter" after upgrade xcode latest Version 13.4.1 (13F100)"

Error: ld: framework not found Flutter

Solution:

  1. First, ensure that you have the latest version of Flutter installed. Run flutter upgrade in your terminal to ensure you have the latest Flutter SDK.
  2. Check if your Flutter project is configured correctly. Sometimes, incorrect configurations can lead to this issue.
  3. Open your Flutter project in Xcode by running open ios/Runner.xcworkspace from your project directory in the terminal.
  4. In Xcode, go to the "General" tab of your project settings. Make sure that the "Frameworks, Libraries, and Embedded Content" section includes the Flutter.framework. If it's missing, you may need to add it manually.
  5. If you're using CocoaPods for dependency management, ensure that your Podfile is correctly configured. You can try running pod install again to ensure all dependencies are properly linked.
  6. Check if there are any build settings or configurations specific to Xcode 13 that might be causing conflicts. Review any recent changes you made to your Xcode project settings.
  7. If you have multiple Flutter projects, try creating a new Flutter project and see if you encounter the same issue. This can help determine if the problem is specific to your project or a general Flutter/Xcode compatibility issue.
  8. If none of the above steps resolve the issue, consider rolling back to a previous version of Xcode that was known to work with your Flutter project. This is not an ideal solution but may be necessary as a temporary workaround until a permanent fix is found.
  9. Finally, check the Flutter GitHub repository and forums for any open issues or discussions related to Xcode 13 compatibility. There may be ongoing efforts to address this issue, and you can find potential workarounds or solutions there.

I solved the same problem by following these steps:

  1. Run flutter upgrade
  2. Run flutter clean
  3. Run flutter run