Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ios][release] GeneratedPluginRegistrant.m Module not found #43986

Closed
nguyenhuutinh opened this issue Nov 1, 2019 · 46 comments
Closed

[ios][release] GeneratedPluginRegistrant.m Module not found #43986

nguyenhuutinh opened this issue Nov 1, 2019 · 46 comments

Comments

@nguyenhuutinh
Copy link

nguyenhuutinh commented Nov 1, 2019

Hi,
I can run flutter build ios, even can work with debug mode on devices
But when I want to release to store, Xcode cannot compile code.
Error: Module xxx not found
I delete it and got same error with the second module

Do you know why?

I use the latest version of Flutter and Xcode

Thanks

@nguyenhuutinh
Copy link
Author

Screenshot 2019-11-01 at 10 42 34 PM

@nguyenhuutinh
Copy link
Author

my fault
#41033

@Sayed-Samy
Copy link

Did you find a solution ?

@pratik-perpetualny
Copy link

I am also looking for a solution.

@fliermanrw
Copy link

I would also like to know what solved the problem. I have the following error:

ios/Runner/GeneratedPluginRegistrant.m:10:9: Module 'location' not found

(and every next module when deleting location)

@ehosseini
Copy link

I have got the same issue.

@Kenoshen
Copy link

Kenoshen commented Jan 10, 2020

I may have found the answer from this comment:

#21989 (comment)

Seems like by opening up the project by double clicking Runner.xcworkspace instead of Runner.xcodeproj xcode can finally figure out where everything is. Even though you can still debug in an emulator and on a connected phone from the .xcodeproj file...

Seems strange that it would fix it. But I'm happy to have an Archived build now.

@DavideBicego
Copy link

Opening the project with Runner.xcworkspace doesn't work for me!
Did anyone found a solution?

@Kenoshen
Copy link

On top of trying the xcworkspace trick, previously, I had tried deleting the Podsfile.lock, cleaning the project, changing the Podsfile min version to 9, or something like that. So it is possible some combination of those things plus the xcworkspace thing is the actual solution.

@kennethnym
Copy link

Nothing worked for me.

@jaredanderton
Copy link

This was the only thing that worked for me:

rm ios/Podfile && flutter build ios

I think I had ran pod init manually, prior to ever building the app from Flutter. Because of that my Podfile was missing the commands to pull in all the other pods. I only noticed the issue after I added a package to my pubspec.yaml, that actually required using a platform channel.

@cmonney
Copy link

cmonney commented Jan 24, 2020

@jaredanderton thanks. It worked for me too

@TheOneWithTheBraid
Copy link
Contributor

TheOneWithTheBraid commented Feb 6, 2020

I fixed it the following way:

  • close Xcode
  • uncomment #platform :ios, '9.0' in the Podfile
cd ./ios/
pod install
flutter clean # cancel by ctrl+c if it hangs up
  • open ios/Runner.xcworkspace

@LeoPote
Copy link

LeoPote commented Feb 25, 2020

I fixed it the following way:

  • close Xcode
  • uncomment #platform :ios, '9.0'
cd ./ios/
pod install
flutter clean # cancel by ctrl+c i hangs up
  • open ios/Runner.xcworkspace

This worked for me too... with the mention that #platform :ios, '9.0' line is Podfile...

@akvilibrium
Copy link

I may have found the answer from this comment:

#21989 (comment)

Seems like by opening up the project by double clicking Runner.xcworkspace instead of Runner.xcodeproj xcode can finally figure out where everything is. Even though you can still debug in an emulator and on a connected phone from the .xcodeproj file...

Seems strange that it would fix it. But I'm happy to have an Archived build now.

Really thank you! It works well for me!
// it requires pod install from terminal btw

@rushabhshah065
Copy link

None of the above works for me!
I have done many work through but did not find anything!
Screen Shot 2020-03-30 at 6 36 03 PM

@IamStupidMan
Copy link

None of the above works for me!
I have done many work through but did not find anything!
Screen Shot 2020-03-30 at 6 36 03 PM
Did you resolve this issue?

@yazinsai
Copy link

yazinsai commented Apr 12, 2020

For me, it turned out the issue was that I was opening ios/Runner.xcodeproj instead of ios/Runner.xcworkspace.

Opening ios/Runner.xcworkspace worked!

@davidgalarza
Copy link

Any update I'm facing the same issue, I'm sure that I open the ios/Runner.xcworkspace

@TheOneWithTheBraid
Copy link
Contributor

@davidgalarza did you try #43986 (comment) ?

@davidgalarza
Copy link

@TheOneWithTheBraid Yes I tried It but did't work

@parvshkhan
Copy link

None of the above works for me!
I have done many work through but did not find anything!
Screen Shot 2020-03-30 at 6 36 03 PM
Did you resolve this issue?

Any solution

@HerrNiklasRaab
Copy link

HerrNiklasRaab commented Apr 24, 2020

@IamStupidMan @parvshkhan @rushabhshah065 I am stuck with exactly the same, did you found a solution to this? I will pay you a beer :D

@HerrNiklasRaab
Copy link

@IamStupidMan @parvshkhan @rushabhshah065

I figured it out for me.

If you have this problem with cloud_firestore and you are using configurations, I am 100% this will fix the issue.

I had multiple xcode configurations and in the scheme there was the wrong configuration associated with the scheme. In my case I needed to change it from Release to Release-development. Also make sure that alle the configurations on the left column are the once you created.

image

This are my configurations:
image

@jawad12345A
Copy link

I am also facing this issue

@jawad12345A
Copy link

I am also getting this error . Does anyone know about it?

[!] A license was specified in podspec audioplayers but the file does not exist - /Users/apple/Desktop/flutter_mp3/courses_app/ios/.symlinks/plugins/audioplayers/LICENSE.md

[!] Unable to read the license file ../LICENSE.md for the spec audioplayers (0.0.1)

[!] Unable to read the license file ../LICENSE.md for the spec audioplayers (0.0.1)

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig).

@phodonou
Copy link

Did you choose the target as Runner in xcode?

@phodonou
Copy link

Also, are you building in different flavors?

@jawad12345A
Copy link

Yes i choose target as runner

@nickgrahamfox
Copy link

For me, it turned out the issue was that I was opening ios/Runner.xcodeproj instead of ios/Runner.xcworkspace.

Opening ios/Runner.xcworkspace worked!

The above fixed my issue as well. Thank you!

@ericaig
Copy link

ericaig commented Sep 22, 2020

For me, it turned out the issue was that I was opening ios/Runner.xcodeproj instead of ios/Runner.xcworkspace.

Opening ios/Runner.xcworkspace worked!

As it turned out, I was doing the same thing 🤦🏽‍♂️ -.... was super used to running the npx cap open ios command on Ionic

@chris-schra
Copy link

It seems most of you found a solution here. I did not, but the deployment target issue made me check all of the pod targets. Although I've iOS 13 in the pod file, although I've set iOS 13 as deployment target like... everywhere ... every single pod framework / target still showed iOS 8, iOS 9 or iOS 11.
So I shift-selected all of them and changed the deployment target to iOS 13:
Bildschirmfoto 2020-10-01 um 00 49 01

Phew, back in business

@MuhammadFaizan980
Copy link

ok, here is what worked for me:

  1. run flutter clean
  2. delete pod file and pod file.lock
  3. delete Pods directory
  4. run flutter run
    Previously I installed pod dependencies using pod install but installing with flutter run is what fixed the issue

@hirakchhatbar
Copy link

For me, it turned out the issue was that I was opening ios/Runner.xcodeproj instead of ios/Runner.xcworkspace.

Opening ios/Runner.xcworkspace worked!

And I thought only google android is wierd!

@dinury-unitalks
Copy link

For me, it turned out the issue was that I was opening ios/Runner.xcodeproj instead of ios/Runner.xcworkspace.

Opening ios/Runner.xcworkspace worked!

Finally after trying every possible solution this actually helped

@FickleLife
Copy link

FickleLife commented Mar 10, 2021

@IamStupidMan @parvshkhan @rushabhshah065

I figured it out for me.

If you have this problem with cloud_firestore and you are using configurations, I am 100% this will fix the issue.

I had multiple xcode configurations and in the scheme there was the wrong configuration associated with the scheme. In my case I needed to change it from Release to Release-development. Also make sure that alle the configurations on the left column are the once you created.

image

This are my configurations:
image

Is there anyway to specify the configuration from the command line? After a flutter clean it defaults to release, which breaks the build. Ideally I can define this at the command line, or it can default to release-prod. It also can't build under fastlane unless this is set.

@ondev
Copy link

ondev commented Mar 21, 2021

rm ios/Podfile
rm ios/Podfile.lock
rm -rf ios/Pods
rm -rf ios/Runner.xcworkspace
flutter clean
flutter build ios

work for me.

@ethdevss
Copy link

@izht

Awesome !!
it is very helpful for me.

Thank you!!!

@tolik85
Copy link

tolik85 commented Apr 25, 2021

For me, my Podfile specify ios version as platform :ios, '11.0' and it work perfectly when run both on emulator and real device. but it does't work for flutter build ios nor xcode archive

After a week of headache, finally I able to fixed it by match an ios target in the deployment info here

image

OMG! How did you find it???

@nimi0112
Copy link

nimi0112 commented May 6, 2021

@IamStupidMan @parvshkhan @rushabhshah065

I figured it out for me.

If you have this problem with cloud_firestore and you are using configurations, I am 100% this will fix the issue.

I had multiple xcode configurations and in the scheme there was the wrong configuration associated with the scheme. In my case I needed to change it from Release to Release-development. Also make sure that alle the configurations on the left column are the once you created.

image

This are my configurations:
image

Thank you, I have set that field to prod in my config ❤️ .

sharing My scheme if it would be useful to anyone.
Screenshot 2021-05-06 at 7 01 25 PM

@kcbaruri
Copy link

kcbaruri commented May 11, 2021

I am experiencing the same problem and no one from above is working where latest version of Flutter, Pod and Dart is being used with stable channel.

@ehcpdeveloper
Copy link

Solved following way:
Open XCode project settings, ios target version: 12 (same as in podfile)
(it was not 12)
rebuild. ok.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests