3

I have flutter's app for iOS. It is working on device. but I cant run this on simulator. I have this error:

/Users/admin/StudioProjects/Cvetovik_app/ios/Runner/GeneratedPluginRegistrant.m:12:9: Module 'audio_session' not found

enter image description here

But I don't use this plugin audio_session. This is my architectures properties:

enter image description here

how do I fix this? I need to test the application on a simulator

nvoigt
  • 75,013
  • 26
  • 93
  • 142
FetFrumos
  • 5,388
  • 8
  • 60
  • 98

2 Answers2

2

First Open runner.xcworkspace not .xcodeproj

Hope its work for you

Try to reinstall Pod

Delete Pods folders and run

flutter clean 
flutter pub get

in ios folder /

pod init
pod deintegrate
pod install
GirlWhoCode
  • 628
  • 4
  • 12
  • Thank you so much. I spent far too long trying to solve this issue. In case this helps someone in the future, here is what I had to do: My issue was my Flutter app worked when testing on Web and Android, but not iOS. I had the same error as this question after adding the flutter_inappwebview module. To run these "pod" commands above, you need to install cocoapods. You may run into issues there, I had luck with installing homebrew then cocoapods. Lastly, in terminal, "cd [drag ios folder from finder for path]" then "pod init" then "pod deintegrate" then "pod install" – Nick Dev Mar 28 '23 at 05:52
1

See the response from GirlWhoCode as it worked for me too. I wanted to add some context in addition to my comment in her answer because this question seems to cause many people problems and it can have many different solutions.

My problem was the same as this question's: Module not found. For me, it was with flutter_inappwebview.

The first fix I made was installing cocoapods. Many Flutter plugins may use it. You can Google for how to do this. It looked simple, but when I tried to install cocoapods on my Mac, I was told I needed to update Ruby (which is installed by default). This threw additional errors, and ultimately I found you can install cocoapods through homebrew instead.

Once cocoapods was installed, I could run the "pod" commands in the answer by GirlWhoCode.

When you run them in order, after "pod install" you will see multiple lines saying "Installing [...]" and finally "Pods installation complete!" If you see this, then you will be able to run your app in Xcode!

Nick Dev
  • 155
  • 1
  • 12