Firebase not usable in iOS app extensions since 3.8.0 due to GTMSessionFetcher sharedApplication #AskFirebase
Asked Answered
E

1

6

I'm using Firebase in my latest app. After upgrading the pods to 3.10.0 the share extension of the app can't be built. The Firebase pods depend on GTMSessionFetcher which uses sharedApplication which is not available in app extensions.

I'm using the following pods in my extension:

pod 'Firebase/Core', '~> 3.7.0'
pod 'Firebase/Crash', '~> 3.7.0'
pod 'Firebase/Auth', '~> 3.7.0'
pod 'Firebase/Database', '~> 3.7.0'

I rolled back to version 3.7.0. This is the last version not relying on sharedApplication.

Will this be fixed in an upcoming version?

Evaporate answered 2/12, 2016 at 13:52 Comment(0)
A
1

This will be fixed in upcoming GTMSessionFetcher and Firebase versions.

In the meantime, since recent Firebase versions reference GTMSessionFetcher as a source pod, the offending code can be ifdef'ed or commented out for code running in app extensions:

enter image description here

Angelo answered 27/2, 2017 at 22:21 Comment(1)
I read about this approach but were unsure. Thanks for clarification. Works!Evaporate

© 2022 - 2024 — McMap. All rights reserved.