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.
Related
I have a Flutter app that runs fine on Android devices. It has a Firebase Firestore backend.
Now, I want to build it on an iOS simulator, and so I need to initialize the Firebase iOS app. (I had only initialized the Android version before.) So I tried following the steps on firebase.com for setting up the iOS Firebase app using Cocoapods... but I think I did something wrong! More specifically, I believe the steps I followed were for adding Firebase to a native iOS app (in Objective C or similar), but when using Flutter, I'm supposed to let the Flutter framework do most of this work, rather than adding pods manually! (Here's a specific instruction for adding Firebase to a Flutter iOS project)
But before doing it right, I want to remove the pods that Cocoapods installed for me. Only I don't know how! 😣 When I web-search, I'm told to delete the pods I don't want from the Podfile. Only there ARE no pods in my ios/Podfile! There's only a bit that says:
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
There's also an ios/Podfile.lock file, and THAT one has a list of all the pods... And then, there's an ios/Pods/Manifest.lock file, which also has such a list... So should I delete the unwanted pod names from one of these two files, instead?
Or otherwise, how do I uninstall my Cocoapods pods, when they are not listed in the ios/Podfile?
Turns out the correct way to install and remove pods from a Flutter project is just to edit the pubspec.yaml file in the root directory!
Cocoapods needs to be installed, but it will automatically read the pubspec.yaml file and do the work from there! 🙂 No need to run pod commands from terminal or otherwise.
I suppose you followed these steps? in this case, you don't need to remove pods.
For step 1, step 2, it should be fine.
For step 3, just remove the config file.
For step 4, if you added firebase with swift package manager, remove it from your packages.
I'm supposed to let the Flutter framework do most of this work, rather than adding pods manually!
How did you add pods manually? from your Podfile, I didn't see any new added pods.
Or otherwise, how do I uninstall my Cocoapods pods, when they are not listed in the ios/Podfile?
You don't need to do anything, in worst cases, just remove the Podfile and re-run the app to let flutter regenerate it.
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
Im new to swift and going through a Tutorial on integrating AWS tools and I keep getting this error, " No such module 'AWSCore' "
However, on the left, you can see these modules are downloaded and there in the pod File.
My question is how to get rid of these errors and correctly import those features. Any help on how to fix this problem will be much appreciated!
re-create a new 'Podfile' on the Root folder of your Xcode project by running the command:
$ pod init
Now make sure your 'Podfile' contains the AWSCore module like shown below.
platform :ios, '9.0'
target :'MyNotes' do
use_frameworks!
# Analytics dependency
pod 'AWSPinpoint', '~> 2.6.10'
pod 'AWSCore', '~> 2.6.10'
# other pods
end
Kindly note for every module you import in your project you will need to include it in your 'Podfile' and then update the 'Podfile' by running the command :
$ pod install
or
$ pod install --repo-update
Close the Xcode project and then open the *.xcworkspace file to relaunch Xcode
I was able to get past this issue by adding $(BUILD_PRODUCT_DIR) ------ recursive. I added it to me release settings as well.
Do not open PROJ.xcodeproj but rather open PROJ.xcworkspace in some case to build pods.
In your case, other answer should lead to right way.
I'm quite new to iOS development. Let's say I want to use a UI element from Github that uses Cocoapods.
Like this one:
Whisper by hyperslo
After downloading the zip file from Github:
Could someone give a step-by-step guide to
Run the demo project
Integrate the UI element into my own project
Thanks!
Running the demo is a little tricky. Apparently you have to first do a pod install, then open the workspace.
Make sure you have cocoa pods installed. For how to install it, go to https://cocoapods.org
Use the command line to navigate to the directory where the .xcworkspace file is located i.e. /Whisper-master/Demo/WhisperDemo
Run pod install
After that, open up WhisperDemo.xcworkspace in Xcode and you can run the demo.
To install this as a pod of your own project, you first navigate to your project's directory and do a pod init. A Podfile will be generated. Write in the Podfile the following:
platform :ios, '10.0' # or whatever your target platform is
target 'Your target's name' do
use_frameworks!
pod 'Whisper'
end
Then do a pod install. From now on, do not open the .xcodeproj file. Instead, open the .xcworkspace whenever you want to work on the project.
I have an objective C iOS app using the Parse SDK.
In the process of moving this app from Parse.com to a self hosted Parse-Server, I need to update the Parse SDK to the latest version. For this update I decided to go with CocoaPods.
This is the first time I touch CocoaPods (after reading and hearing so much good about it).
I found my way, following what I could read here and also based on a few CocoaPods tutorial I quickly viewed.
Having my project "ready", when buiding it I get this error:
#import <ParseUI/ParseUI.h> -----> File not found.
Obviously things have changed place. And I tried a couple of unsuccessful solutions.
So here is my question:
How do I need to change the settings of my project, now that I am using CocoaPods?
In order to use Cocoapods with parse and Parse UI you need to do the following steps:
Create a new file and name it Podfile. This file should be located on your IOS project root folder.
The Podfile should contain at least the following structure if you want to use parse IOS SDK and ParseUI
platform :ios, '8.0'
use_frameworks!
pod 'Parse'
pod 'ParseUI'
# Put more pods in here..
Notice to the platform, you may change it to the minimum version that your app can run on and the use_frameworks! will install all your pod as frameworks and this is mandatory if you like to consume Swift libraries.
Open terminal and navigate to your IOS root directory and enter pod install. This command will install all the pods and dependencies into your project.
After installing you will no longer use the IOS project file from now on you will use a new file which called workspace. The workspace will contain both your project files and the pods project/frameworks files.
Build your project, fix some error (if there are) and run it to make sure that it works as expected .
More CocoaPods commands that you need to know are:
pod update - update all your pods to the latest release or to the release that was mentioned in the Podfile
pod update update specific pod to the latest release or to the release that was mentioned in the Podfile
pod outdated - display out to date pods that are being used inside your project.