This question already has answers here:
Getting error "No such module" using Xcode, but the framework is there
(82 answers)
Closed 26 days ago.
I have published my app in TestFlight but it is crashing while startup. When I view crash logs, it say “No such module 'Flutter’”. I do know how to fix.
Thanks in Advance

Open IOS Folder in terminal ,
write
pod install
then
pod update
then it will work
This apparently a bug in XCode 13.1.
It is claimed by Flutter team to be a bug with the visual component of XCode... as evidenced by the fact that the project will still build and run from XCode.
There are many reported ways to get rid of it temporarily, such as doing Product\build , Product\Clean Build Folder, or running the project on IOS from within Android Studio...
But these are only temporary and the problem will reappear.
https://github.com/flutter/flutter/issues/92337
Just did like #Tasnuva said, and it worked in my case:
Remove podfile.lock file and Pods folder
Run pod install then pod update
Reopen Runner.xcworkspace
No such module Flutter still exist, just ignore and run as usual
No such module flutter suddenly disappear after build succeed
Try this steps. Checked on XCode 14.1
Make sure that you open xcworkspace instead of xcodeproj. xcworkspace - contains information about pods.
flutter clean
flutter pub get
pod install
The error all the same will be display
Try to build. Build should be succeeded and the error disappear.
i just removed Podfile.lock and Pods folder then run pod install
You shouldn't need to touch pod directly. Instead, you can remove ios/Pods and then:
flutter clean
flutter pub get
flutter build ios
Which has come up in a related issue before, e.g. https://github.com/flutter/flutter/issues/73845#issuecomment-879428744
In my case it was me not putting
install_all_flutter_pods(flutter_application_path)
in the Podfile
for target 'my_app'
I added it for the testing target but not the project...
than pod install
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'my_app' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for counter_app
flutter_application_path = '../flutter_project'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
install_all_flutter_pods(flutter_application_path)
target 'my_appTests' do
inherit! :search_paths
# Pods for testing
install_all_flutter_pods(flutter_application_path)
end
target 'my_appUITests' do
# Pods for testing
install_all_flutter_pods(flutter_application_path)
end
end
This problem occurs when you have changed your podfile and the pod install command does not work
The piece of code mentioned below is not executing inside your podfile.
flutter_install_all_ios_pods
Fix this out then run
flutter pub get
cd ios && pod install
Related
I have a problem,
I tried to publish a new version of my app on the apple store and it gave this problem:
Module 'firebase_analytics' not found
Has anyone ever experienced this?
Module 'firebase_analytics' not found
First of all, make sure you add analytics to your podfile.
target 'Runner' do
pod 'Firebase/Analytics'
end
The other thing is to go to the ios directory and execute the command.
pod clean
pod install
Finally you could run the following commands in the root directory.
flutter clean
flutter pub get
React Native Firebase installation for iOS gets held up at the "Run your app to verify installation" screen.
React Native Firebase has worked on Android for me before.
I followed these instructions.
https://rnfirebase.io/docs/v5.x.x/installation/ios
https://firebase.google.com/docs/ios/setup#add_the_sdk
Here are what I've done so far.
-Set up a project within Firebase.google.com page.
-Create an iOS app there.
-Install react-native-firebase via npm.
-Add GoogleService-Info.plist file to the project within XCode.
-Make changes to ios/[YOUR APP NAME]/AppDelegate.m file.
-Creat a new Podfile (Cocoa pod) and updated it by "pod update" command.
-Add and edited lines to the Podfile per the instruction.
-Run "pod install"
-Run "react-native link react-native-firebase" from the project root.
-Click "Next" button within Firebase console and move on to "Run your app to verify installation" section.
-Run the iOS app on simulator by running "react-native run-ios" command.
The app boots up and functions as normal in the simulator.
Nothing happens in the Firebase page.
This is the first couple of lines of my Podfile.
# Uncomment the next line to define a global platform for your
project
platform :ios, '9.0'
# Required by RNFirebase
pod 'Firebase/Core', '~> 5.20.1'
target 'My_App_Name' do
https://dev-yakuza.github.io/en/react-native/react-native-firebase-admob/
Check this guy's blog. In his particular case, he is integrating Firebase and Admob, but the first part is really descriptive on how to install and set the RNFirebase package.
I found the partial answer to this thanks to #Mike Hardy in the other thread here:
Error message - RNFirebase core module was not found natively on iOS
For the most part, you can trust the official instruction on this page.
https://rnfirebase.io/docs/v5.x.x/installation/initial-setup
However. There are a few things that are not articulated there you’d need to follow in order to install React Native Firebase on iOS.
I followed the below steps and I managed to get it through the infinite “Verify installation” loop.
-1) Comment out the following lines from your Podfile. You might see the same line in two locations. Comment out all of them.
use_frameworks!
-2) Also comment out a couple of lines just BEFORE the very last end in your Podfile. Once you’ve done this, you will only see one instance of end at the last line.
target ‘YourProjectName-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
-3) Insert the following line just before the final end.
system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")
-4) And then, run pod install and pod update from your terminal.
-5) Go to Xcode, Check the Build Phases/ Link Binary with Libraries section. Confirm that libRNFirebase.a is already there.
-6) Go to Xcode, select a device of your choice and hit “Run”*
*If you use the command from terminal, it will no longer open your app in the simulator. I don’t know why. But it looks as if once React Native Firebase is installed, the only way to test your app is through the Xcode.
react-native run-ios
**Please note I’ve only verified it with the ‘Firebase/Core’ pod. When I tried to add ‘Analytics’ or ‘AdMob’ module in the Podfile, it crashed.
The problem for me was that my GoogleService-Info.plist was actually from a different firebase project, so it had the wrong project id, bundle id, etc.
FOR REACT NATIVE
So I had the same problem and silly me I put the GoogleService-Info.plist file in the wrong place...
It needs to go directly in the /ios folder!
You need to include necessary modules in your Podfile.
Here is my Podfile
pod 'Firebase/Core', '~> 6.3.0'
pod 'Firebase/Messaging', '~> 6.3.0'
pod 'Firebase/AdMob', '~> 6.3.0'
Note that I had to manually change framework path of GoogleMobileAds with XCode to value $(SRCROOT)/../../../ios/Pods/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework-Current in RNFirebase.xcodeproj file in Librairie > Build Settings > Framework Search Paths
I don't know if this works for you but this is what I did.
I backed up my files. created a new project.
Ran pod init and pod install on a fresh project with no code.
After this I closed Xcode and ran $ sudo gem install cocoapods --pre in the same terminal window.
Finally in terminal that I ran pod install and pod update again.
At this point I reopened my fresh project and reconnected my files.Worked like a gem.
I fought with this for probably 12 hours on my new Mac Book Pro.
You probably do not have the latest version of Firebase in your Pods.
Open your Pod file and add this before the "end" statement:
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
Go to Terminal and cd to your root folder of the Xcode project.
Now, type "pod install" and hit enter. This should update your Firebase SDK and build the latest version of Firebase when you build your app.
Note: You should also delete your app on Simulator and re-install it for the changes to take effect.
I am getting multiple command produce gRPCCertificates.bundle
Multiple commands produce '...iphoneos/gRPCCertificates.bundle':
1)
Target 'gRPC-C++-gRPCCertificates' has create directory command with
output '.../iphoneos/gRPCCertificates.bundle'
2) Target
'FirebaseFirestore-gRPCCertificates' has create directory command with
output '....iphoneos/gRPCCertificates.bundle'
Here is my Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
target 'FireCheck' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for FireCheck
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
I have already tried clean, deleting derived data, deintegrating and reintegrating pods, nothing works
I am using Xcode 10.
It only happens when I do build and achieve ... normal run/debug works
It also only happens in macOS 10.14 (18A391) not in previous version of the macOS (High Sierra)
More information I have added here
https://github.com/firebase/firebase-ios-sdk/issues/2102
Run pod update
The issue is now fixed with the release of version 0.0.5 of gRPC-C++.
More details at https://github.com/firebase/firebase-ios-sdk/issues/2102
While waiting for an update on the Github project, you can temporarily use the previous version of Firestore.
pod 'Firebase/Firestore', '5.12.0'
For anyone that didn't use CocoaPods to install RNFirebase and is getting this error, navigating to the Build Phases -> Copy Build Resources in Xcode and removing the duplicate gRPCCertificates.bundle file manually worked for me.
Its frustrating seeing this error every time i use cocoa-pods. The only thing that works with cocoa-pods is 'Firebase SDK' but when i install any other framework such as JSQMessages or Eureka forms or any other framework i got an error 'No such a module" ... Its not the first time I work with these frameworks I did before and it was working correctly in fact I still got my previous projects installed with JSQMesgs, eurka..etc and its working fine till now. For the new projects it doesn't work/import in xcode anymore it is frustrating that I can't run it with this error ... not sure if its xcode or the cocopods .. I have tried instaling using terminal then uninstall and reinstall again with cocoapods application. I cleaned my build, change deployment target several times, and nothing worked so please if any one could share the same problems faced or advice me on how to avoid them or any alternatives to cocoapods.
deployment target 10.3 my xcode version 8.3.3 swift 3 macOS Sierra 10.12.5
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'FinalProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for FinalProject
pod 'Firebase/Core'
pod 'Firebase'
pod 'FirebaseAuth'
pod 'FirebaseDatabase'
pod 'FirebaseStorage'
pod 'ProgressHUD'
pod 'JSQMessagesViewController'
pod 'Eureka'
pod 'Former'
pod 'SwiftForms'
end
Please help.
Build the project.
The Xcode editor doesn't recognize modules coming from the Pods until after they've been built for the first time.
If that doesn't work for you, please share a screen shot of the issue, or even better, a reproducible example.
I had the same problem trying to work with SwiftyStoreKit.
I finally manage to solve my problem and hope that sharing the solution will help someone.
I tried everything was suggested until I realised that I was loading the pod in the wrong target, (in the pod file itself.)
After I repaired the pod file, run again pod install, and, voila, the xcode recognised the pod.
I am getting an error when building my app after i removed reference to a framework i added incorrectly. i am new to ios and cocoapods
/Users/MyMac/Library/Developer/Xcode/DerivedData/MyApp-ewxrexwuczochyctnqvlyusrtvvy/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Script-5874133373474758EEC76CFD.sh: line 2: /Users/MyMac/Documents/MyApp/Pods/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks.sh: No such file or directory
I am aware that the file and directory don't exist and that is the way it should be but where is it finding the reference to this file so i can remove it and be rid of the error.
I have checked the following:
Linked Frameworks andLibraries under the general tab of my project
The frameworks group in the project
framework search paths under build settings tab
i have also run pod update after removing it from the pod file
How can i fix this?
Edit
back story
I was trying to add the framework https://github.com/Alliants/ALAccordion . in the instruction it said to use
# Podfile
target 'My Target' do
use_frameworks!
pod "ALAccordion"
end
so i added MyApp where my Target is and it created a framework named Pods-MyApp which i cant remove completely.
hope this helps
Cocoapods wrote a tool to completely deintegrate all of this stuff from your project so it goes back to running standalone. It sounds like you had an issue adding the correct target, so use this:
https://github.com/CocoaPods/cocoapods-deintegrate
Then try again so you can at least start from good ground. Hope this helps!
It happened with a prerelease version of Cocoapods 1.2.0.beta.1, by reverting to stable version and running pod install, then clean build, it worked.
why
use_frameworks!
after
target ... do
here is example
platform :ios, '8.0'
use_frameworks!
inhibit_all_warnings!
target 'XXX' do
pod 'RealmSwift'
end
target 'XXXTests' do
pod 'RealmSwift'
end