L.U.
L.U.

Reputation: 521

Firebase iOS stuck at 'Run your app to verify installation'

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

Upvotes: 1

Views: 3440

Answers (7)

Taylor A. Leach
Taylor A. Leach

Reputation: 2344

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!

Upvotes: 1

Skadoosh
Skadoosh

Reputation: 171

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.

Upvotes: 0

Elf
Elf

Reputation: 11

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.

Upvotes: 1

TACPguy
TACPguy

Reputation: 1

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.

Upvotes: 0

Porzio Jonathan
Porzio Jonathan

Reputation: 563

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

Upvotes: 0

L.U.
L.U.

Reputation: 521

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.

Upvotes: 1

P.Zdravkov
P.Zdravkov

Reputation: 141

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.

Upvotes: 1

Related Questions