Firestore installation using Cocoapods

馋奶兔 提交于 2020-03-04 05:20:31

问题


I'm trying to install firestore in my project.

when I'm trying to install that, Xcode displays

fatal error: module map file '/Users/account/Documents/myapp/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found

or sometimes another errors....

so I've spend so many of times (almost entire 2 days) to solve this problem, but nothing is actually working :/ (deleting derived data and Pods folder, pod deintegrate, pod install and update or cleaning build (Command-shift-k)).

platform :ios, '13.0'

target 'myapp' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
use_modular_headers!

# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/DynamicLinks'

pod 'Firebase/Core'
pod 'Firebase/Firestore'
#pod 'FirebaseFirestoreSwift'

# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-posd

end

this is my Podfile. and whenever I delete pod 'Firebase/Firestore', everything's working whereas Firebase/Firestore is not. (surely to recover normal working state, I comment all of pod repositories, (in terminal) type "pod install" and then uncomment top 4 repositories and pod install....)

I really wanna use Firestore, but I can't.

please help me.


回答1:


Firestore requires latest CocoaPods. As per Google developer

It should get better with CocoaPods 1.9.0 which is adding the capability to specify dynamic/static linkage for each pod in the Podfile.

Please check this link https://github.com/firebase/firebase-ios-sdk/issues/3816




回答2:


We can also force CocoaPods to not apply modular headers for the troubling pods... in this case:

pod 'BoringSSL-GRPC', '= 0.0.3', :modular_headers => false
pod 'gRPC-Core', '= 1.21.0', :modular_headers => false


来源:https://stackoverflow.com/questions/59727138/firestore-installation-using-cocoapods

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