12
votes

Problem

After following the tutorial for react-native-firebase, my app hangs after a successful build. The error I get in Xcode is: Thread 1: signal SIGABRT. I understand from other questions that this has something to do with connections, but I do not know why this error occurs.

This is my first React Native project and first time working with Xcode.

What I did

  1. I added react-native-firebase and firebase.
  2. Ran react-native link react-native-firebase.
  3. Added the GoogleService-Info.plist to the project by dragging it into the Xcode editor.
  4. Stopped all Xcode tasks and quitted Xcode.
  5. Did a pod init.
  6. Adjusted the podfile to the following:

    # Uncomment the next line to define a global platform for your project
    platform :ios, '9.0'
    
    target 'Enso' do
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
    # use_frameworks!
    
      # Pods for Enso
        pod 'Firebase/Core'
    
    end
    
  7. Did a pod install
  8. Opened the xcworkspace file
  9. Added the #import <Firebase.h> and [FIRApp configure]; to AppDelegate.m
  10. Cleaned the project
  11. Run the project
  12. Project build successful, but the app keeps hanging on the white screen with the name of the app and 'Powered by React Native'.
  13. After about 10 seconds the Xcode editor will show me the following: Image with error in Xcode

More info

I have these Linked Frameworks and Libraries:

  • libRNSVG.a
  • libRNBackgroundTimer.a
  • libRNFirebase.a
  • libART.a
  • libRCTBlob.a
  • libReact.a
  • libRCTAnimation.a
  • libRCTActionSheet.a
  • libRCTGeolocation.a
  • libRCTImage.a
  • libRCTLinking.a
  • libRCTNetwork.a
  • libRCTSettings.a
  • libRCTText.a
  • libRCTVibration.a
  • libRCTWebSocket.a
  • libPos-Enso.a

I have this in my Header Search Paths:

  • $(inherited)
  • $(SRCROOT)/../node_modules/react-native-background-timer/ios
  • $(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase
  • $(SRCROOT)/../node_modules/react-native-svg/ios
  • $(SRCROOT)/../ios/Pods
  • $(SRCROOT)/../node_modules/react-native/React
1
Fixed. Apparently I did not add the GoogleService-Info.plist to my project correctly. To fix it: stackoverflow.com/questions/45317777/….Job Ouddeken

1 Answers

1
votes

Looks like GoogleAppMeasurement gets imported as a dependency with version 5.3.0.

A simple addition to the Podfile like below fixed the problem for me.

# Required by RNFirebase
pod 'Firebase/Core', '~> 5.9.0'
pod 'GoogleAppMeasurement', '~> 5.2.0'

As show here