Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter module not found in Xcode

Tags:

xcode

ios

flutter

When I build the app in Xcode it throws the error: .../ios/Runner/GeneratedPluginRegistrant.m:10:9: Module 'audioplayers' not found I tried reinstalling and setting up pods again, however it didn't work. I am also including pod 'Firebase/Core' in the pod file. Maybe I need to include the Audioplayer module there as well? Thanks in advance!

like image 311
Silent Tree Avatar asked May 22 '20 13:05

Silent Tree


People also ask

How do you create a module in flutter?

Using the File > New > New Module… menu in Android Studio in your existing Android project, you can either create a new Flutter module to integrate, or select an existing Flutter module that was created previously. If you create a new module, you can use a wizard to select the module name, location, and so on.

How do I add iOS platform to flutter?

If you only want to add support for specific enabled platforms, you can do that by supplying the --platforms argument: flutter create --platforms=web,macos . I get the error No option specified for the output directory. when run flutter create or flutter create --platforms web .


5 Answers

Make sure platform: iOS version in pod file matches with deployment info in Xcode

enter image description here

like image 156
thanhbinh84 Avatar answered Oct 23 '22 19:10

thanhbinh84


Did you make sure that you started xcode by double clicking the "runner.xcworkspace" from your "project/ios" folder and not "runner.xcodeproj"?

According to this source, it solves the "missing module" issue for a lot of people (As it did for me). https://github.com/flutter/flutter/issues/41033

like image 43
Salatgurke Avatar answered Oct 23 '22 17:10

Salatgurke


Have tried many things, flutter clean, revert the Podfile and etc, still facing the same issue.

Eventually get this fix by solving the issue highlighted in Xcode. You can check

https://github.com/flutter/flutter/issues/54599#issuecomment-644336055 https://github.com/flutter/flutter/issues/53573#issuecomment-749912604

like image 14
ITW Avatar answered Oct 23 '22 19:10

ITW


  1. Delete Podfile
  2. flutter clean
  3. flutter pub get
  4. flutter build ios

It works for me!

like image 15
Anuar Moldabayev Avatar answered Oct 23 '22 18:10

Anuar Moldabayev


Make sure that the selected scheme to run is "debug"

  • Click "Runner" which is just near the simulator dropdown.
  • Edit scheme.
  • Select "Run" at the left list.
  • Select "Debug" for "Build Configuration"
like image 11
3 revs Avatar answered Oct 23 '22 19:10

3 revs