How to use Firebase SDK as a Pod dependency?

时光总嘲笑我的痴心妄想 提交于 2019-12-19 09:24:16

问题


Now that the iOS Firebase SDK is open-source, I'd like to build a pod using Firebase as a dependency. To do so, I create a new pod template with the following.

My issue is that I can import FirebaseDev from the example project, but I cannot from my development pod. I knew this was an issue before the SDK got open-source, but I hope to be able to fix this issue now but I need help identifying where the problem lies. Anyone can help on this?

.podspec:

s.dependency 'FirebaseDev'
s.dependency 'FirebaseDev/Core'
s.dependency 'FirebaseDev/Auth'
s.dependency 'FirebaseDev/Database'

Example/Podfile:

pod 'FirebaseDev', :git => 'https://github.com/firebase/firebase-ios-sdk'
pod 'FirebaseDev/Core', :git => 'https://github.com/firebase/firebase-ios-sdk'
pod 'FirebaseDev/Auth', :git => 'https://github.com/firebase/firebase-ios-sdk'
pod 'FirebaseDev/Database', :git => 'https://github.com/firebase/firebase-ios-sdk'

回答1:


A little late but, in your .podspec add s.static_framework = true. That'll let you use Firebase as a pod dependency!




回答2:


Following some advice on the linked GitHub issue, I created a fork of firebase-ios-sdk in which I only removed the modulemap file and I was finally able to create a Pod using Firebase as a dependency! Youhou!!!

I need to find out if this has some nasty side-effects now.

Update: the corresponding pull request has been merged.



来源:https://stackoverflow.com/questions/44290640/how-to-use-firebase-sdk-as-a-pod-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!