Firebase Module install on ios

前端 未结 10 1419
囚心锁ツ
囚心锁ツ 2021-02-18 20:38

I followed all instructions for integrating the new firebase release on ios:

  1. I downloaded the file GoogleService-Info.plist

10条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-18 21:00

    I had the same problem. I found that the problem was I have three targets in Cocoapods file. And only my main one target has Firebase added. So that when I want to import Firebase to a file that is used in other targets, Xcode gives error and says Module 'Firebase' not found. This is my pods project file. One solution for me is adding Firebase pod to all targets. Or another solution is removing the file from other targets.

    def common_pods
      pod 'XXX'
    end
    
    target 'myMainProject' do
      common_pods()
      pod 'Firebase/Core'
      pod 'Firebase/AdMob'
      pod 'Firebase/RemoteConfig'
      pod 'Firebase/Crashlytics'
      pod 'Firebase/Analytics'
    end
    
    target 'myExtention1' do
      common_pods()
    end
    
    target 'myextension2' do
      common_pods()
    end

提交回复
热议问题