22

I have published my app in TestFlight but it is crashing while startup. When I view crash logs, it say “No such module 'Flutter’”. I do know how to fix.

Thanks in Advance  Crash Report

Aayush Bhattarai
  • 510
  • 1
  • 7
  • 16
  • Does this answer your quetion? https://stackoverflow.com/questions/29500227/getting-error-no-such-module-using-xcode-but-the-framework-is-there# – Mahan Vyakti Nov 16 '21 at 10:49
  • I have same problem with Xcode 14.3. In my case the issue come from I have edit scheme>run as release then I reset scheme>run as debug mode again. – Kakashi Jun 15 '23 at 16:44

8 Answers8

14

Open IOS Folder in terminal , write

pod install

then

pod update

then it will work

13

This apparently a bug in XCode 13.1.

It is claimed by Flutter team to be a bug with the visual component of XCode... as evidenced by the fact that the project will still build and run from XCode.

There are many reported ways to get rid of it temporarily, such as doing Product\build , Product\Clean Build Folder, or running the project on IOS from within Android Studio...

But these are only temporary and the problem will reappear.

https://github.com/flutter/flutter/issues/92337

Nerdy Bunz
  • 6,040
  • 10
  • 41
  • 100
8

Try this steps. Checked on XCode 14.1

  1. Make sure that you open xcworkspace instead of xcodeproj. xcworkspace - contains information about pods.
  2. flutter clean
  3. flutter pub get
  4. cd ios; pod install
  5. The error all the same will be display
  6. Try to build. Build should be succeeded and the error disappear.
Maxim Mai
  • 145
  • 5
  • 14
Aleksey Mukovin
  • 110
  • 1
  • 5
7

Need to run both pod install and pod update as others say, but with extra few steps like below, and this is solved my case:

  1. Remove podfile.lock file and Pods folder
  2. Run pod install then pod update
  3. Reopen Runner.xcworkspace not Runner.xcodeproj
  4. No such module Flutter still exist, just ignore and run as usual
  5. No such module flutter suddenly disappear after build succeed
omega_mi
  • 243
  • 2
  • 11
3

You shouldn't need to touch pod directly. Instead, you can remove ios/Pods and then:

flutter clean
flutter pub get
flutter build ios

Which has come up in a related issue before, e.g. https://github.com/flutter/flutter/issues/73845#issuecomment-879428744

qix
  • 7,228
  • 1
  • 55
  • 65
2

i just removed Podfile.lock and Pods folder then run pod install

ali ozkara
  • 5,425
  • 2
  • 27
  • 24
0

In my case it was me not putting

install_all_flutter_pods(flutter_application_path)

in the Podfile for target 'my_app'

I added it for the testing target but not the project...

than pod install

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'my_app' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for counter_app
  flutter_application_path = '../flutter_project'
  load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
  install_all_flutter_pods(flutter_application_path)

  target 'my_appTests' do
    inherit! :search_paths
    # Pods for testing
    install_all_flutter_pods(flutter_application_path)
  end

  target 'my_appUITests' do
    # Pods for testing
    install_all_flutter_pods(flutter_application_path)
  end

end
Jan-Stepien
  • 349
  • 2
  • 9
0

This problem occurs when you have changed your podfile and the pod install command does not work The piece of code mentioned below is not executing inside your podfile.

flutter_install_all_ios_pods

Fix this out then run

flutter pub get
cd ios && pod install
Manish Arora
  • 397
  • 3
  • 12