0
votes

I have a react-native project and I have to link my xCode project with firebase. Even though I used CocoaPod and manual ways I am getting the error

"No such module as firebase.h".

I have followed all the steps correctly.

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'App' do

# Uncomment the next line if you're using Swift or would like to use dynamic frameworks

# use_frameworks!

# Pods for App

target 'App-tvOSTests' do

inherit! :search_paths

# Pods for testing

end

target 'AppTests' do

inherit! :search_paths

# Pods for testing

end

pod 'Google-Mobile-Ads-SDK'

pod 'Firebase/Core', '~> 5.6.0'

pod 'GoogleIDFASupport'

end

target 'App-tvOS' do

# Uncomment the next line if you're using Swift or would like to use

dynamic frameworks

# use_frameworks!

# Pods for App-tvOS

end

2
@Sumiya Can you share your pod file?ayon.gupta
sure. just a minuteSumyia Yaseen
@Nivrutti here have a lookSumyia Yaseen
What is the deployment target of your iOS app?ayon.gupta

2 Answers

1
votes

I also faced this problem. I was using react-native-firebase package. Please try following their official docs . I would rate their documentation 10/10 as they've explained every possible scenario a developer would face during integration.

1
votes

Just change value with deployment target of your app.

platform :ios, 'value'
inhibit_all_warnings!

def sharedpods
pod 'Google-Mobile-Ads-SDK'
pod 'Firebase/Core', '~> 5.6.0'
pod 'GoogleIDFASupport'
end

target 'AppTests’ do
use_frameworks!
sharedpods
end

target 'App-tvOSTests’ do
use_frameworks!
sharedpods
end

target 'App-tvOS’ do
use_frameworks!
sharedpods
end

#post_install do |installer|
#  installer.pods_project.targets.each do |target|
#    puts "#{target.name}"
#  end
#end