6
b2plane
3y

Yesterday whole day ive been trying to deploy an ios app to app store from a flutter project but kept getting "module not found" in build compilation error

I thought to myself am i fucking dumb?

Or maybe i am smart but extremely UNLUCKY in life like always?

Today i googled for this error and one of the top stack overflow answers with a +50 bounty points, first sentence they answered was "this is a very bad and UNLUCKY error, after trying to solve this issue for hours i finally found the solution..."

......

...........

Comments
  • 1
    Did you just have to rebuild it and try again? Or is it a camel-case issue.
  • 1
    @ojt-rant no clue. Its still not fking working. Im still struggling
  • 2
    I'm sure you've tried all of this, but just incase

    Delete Podfile

    flutter clean

    flutter pub get

    flutter build ios

    Use, "runner.xcworkspace" not "runner.xcodeproj"

    If using M1 chip Mac use Rosetta for pod installation (terminal -> right click -> info -> use Rosetta)
  • 0
    @ojt-rant Yes i tried probably all of those commands. Removing podfile.lock removing Podfile, updating upgrading installing pod file, flutter clean, restarted intellij and invalidated cache.

    Also im using 3 different flutter flavors so maybe the problem has to do with that?

    I cant do

    flutter build ios

    because of flavors, it doesnt know what main file to pickup so i do

    flutter build ios -t lib/main_production.dart --flavor production

    And then it successfully builds it.

    But when i go Runner -> Archive thats where build fails. App works fine during debug mode and even release but cant seem to be compiled and deployed to app store.

    I just tried what you said and still the same error "Module 'firebase_core' not found".

    If you have a minute can you please join via anydesk to my pc and take a look at this yourself. Maybe you'll spot something i missed.

    AnyDesk ID: 943 137 770
Add Comment