Giter Site home page Giter Site logo

Comments (16)

Mactub07 avatar Mactub07 commented on July 28, 2024 5

use #import <Firebase/Firebase.h> instead of @import Firebase, it work for my (React-native 0.42)

from react-native-firebase-analytics.

damir-sirola avatar damir-sirola commented on July 28, 2024 1

Check if you have react-native-firebase-analytics v2.0.0 or v3.0.0 installed.
Also check if you installed Firebase Analytics through POD.
Make sure you imported Firebase in AppDelegate.m @import Firebase;

from react-native-firebase-analytics.

evollu avatar evollu commented on July 28, 2024 1

@fungilation it depends on how your integrate firebase with your solution
@import Firebase; only works for pod integration
I will update readme later

from react-native-firebase-analytics.

pewh avatar pewh commented on July 28, 2024

I have same issue. I'll try @damir-sirola suggestion. Anyway, I'm curious why no mention in readme to install react-native-firebase-analytics

from react-native-firebase-analytics.

Phoenix-GH avatar Phoenix-GH commented on July 28, 2024

I also have this issue, I installed react-native-firebase-analytics also but it doesn't help me.

from react-native-firebase-analytics.

edencakir avatar edencakir commented on July 28, 2024

I downgraded to 0.39. but using pods solved my issue (in 0.40), just type pod update few times, reset everything etc. @phOenix214

from react-native-firebase-analytics.

fungilation avatar fungilation commented on July 28, 2024

I hit the same error. I'm on RN 0.41.2 and latest of this package.

The solution after much poking around:

@import Firebase;

at top of AppDelegate.m (as mentioned by @damir-sirola)

But also, I found I needed to comment out all the unused targets in Podfile or compiling would fail too, like so:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target '<app_name>' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for <app_name>
  pod 'Firebase/Core'

#  target '<app_name>-tvOSTests' do
#    inherit! :search_paths
#    # Pods for testing
#  end
#
#  target '<app_name>Tests' do
#    inherit! :search_paths
#    # Pods for testing
#  end

end

#target '<app_name>-tvOS' do
#  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
#  # use_frameworks!
#
#  # Pods for <app_name>-tvOS
#
#  target '<app_name>-tvOSTests' do
#    inherit! :search_paths
#    # Pods for testing
#  end
#
#end

@evollu, README can use some updating with these 2 bits for other users? Thanks for this package.

As an aside, I'm using this package in conjunction with CodePush. I'm currently stuck where building this in XCode with a Staging config (duplicate from Release), to a physical device, the build would fail. Building the same to the simulator however succeeds. Release and Debug builds to both device and simulator would succeed. Can't figure out why the Staging build to device fails.

from react-native-firebase-analytics.

mienaikoe avatar mienaikoe commented on July 28, 2024

@Mactub07 does not work if you're using frameworks

from react-native-firebase-analytics.

evollu avatar evollu commented on July 28, 2024

I use frameworks myself
I just have #import "RNFIRMessaging.h" only in my appdeletegate.m

from react-native-firebase-analytics.

mienaikoe avatar mienaikoe commented on July 28, 2024

If I have use_frameworks!and that import only in my appdelegate.m, I get the FirebaseCore/FIRApp.h error noted in the first comment.

Using react-native 0.43.1

from react-native-firebase-analytics.

evollu avatar evollu commented on July 28, 2024

what firebase iOS version are you using? I remember 4.0 introduced breaking change so this repo isn't compatible with that

from react-native-firebase-analytics.

mienaikoe avatar mienaikoe commented on July 28, 2024

yea i saw the recent note, so am using 3.16.0

I figured it out finally. See my notes on evollu/react-native-fcm#377, which is the same problem, but on your other package, react-native-fcm.

from react-native-firebase-analytics.

evollu avatar evollu commented on July 28, 2024

Where is inherit! :search_paths?

from react-native-firebase-analytics.

mienaikoe avatar mienaikoe commented on July 28, 2024

inherit! :search_paths is a directive you can use in a Podfile. another react-native module called tipsi-stripe requires it to be in your Podfile but seems to conflict with react-native-fcm. My guess is that on link time, the linker can't find the firebase headers in the Pod-provided search paths if that directive is on.

from react-native-firebase-analytics.

shrutic avatar shrutic commented on July 28, 2024

I tried the following:

  • #import <Firebase/Firebase.h> instead of #import 'firebase.h' in my bridging header ( as I am using Swift)
  • Changed my Pod file to reference Firebase version 3.16 like below:
pod 'Firebase',  '~> 3.16', :subspecs => [
    'Analytics',
    'Messaging',
  ]
  • I do not have inherit! :search_paths in my Podfile
  • Added import Firebase to the header of my AppDelegate.swift
    I still get the error reported by the issue Unable to find #import <FirebaseCore/FIRApp.h> in RNFIRMessaging.h

from react-native-firebase-analytics.

agrawalsurabhi89 avatar agrawalsurabhi89 commented on July 28, 2024

Any update on this issue?

from react-native-firebase-analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.