I’m currently trying to work with xcode to test my flutter application with xcode. The big issue is that all of my imports (such as app_settings, cloud_firestore, etc…) give an error for "Module ___ not found". When I try to run my dart code I get the error in the terminal:
[Proj Root]/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'app_settings' not found
@import app_settings;
~~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I tried running flutter create for ios, (this might’ve made things worse?) Flutter clean and reinstalling pods doesn’t seem to work either. I’m wondering if there’s something simple that I missed with importing modules. I created the application on android using modules that should work with Android & iOS. After getting the android version working I pulled my project on my mac through github and finally reached this issue. Any pointers would be appreciated because I’m totally stuck on this.
7
Answers
Hmm Not sure what happened but it seems to be good now. I think
pod init
was initializing minimal data for the podfile. Instead, I deleted the Pods file and did flutter run and it built the podfile correctly withflutter pub get
.My project has 3 build flavor. Development, Staging & Production.
In Xcode It was selected default Runner One. (On Top of the middle)
though i follow the process like
NB: I tested in M1 machine.
Had the same problem, we solved it by setting the iOS Deployment target in XCode to the same value as set in the
Podfile
, which was12.0
. Then ranflutter clean
andflutter build ios
worked like a charm 🎉I had this same problem. What I did was
flutter clean
flutter build ios
This worked for me 🎉
I had the same issue after upgrading the Xcode to 13.3 and my production build flavor wasn’t working. I was using firebase as well. In my production build flavor, I didn’t append anything to the configuration name (i.e. all the other configurations have the name like "Debug-staging", "Debug-development", but in the production, it’s only "Debug"). I just deleted the pod file and run:
Everything worked fine for me.
I tried everything above, but for me the solution was quite different.
I am using flavors (schemes), and I accidentally created the scheme with upper case in the first character, while everywhere else (build config etc.) I used lower cases only. After deleting the scheme and recreating with lower case characters, it worked.