FirebaseAuth 5.0.x可以在iOS应用扩展中使用吗? [英] Can FirebaseAuth 5.0.x be used in an iOS app extension?

查看:68
本文介绍了FirebaseAuth 5.0.x可以在iOS应用扩展中使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

FirebaseAuth在FIRAuth.m中使用[UIApplication sharedApplication].由于该API不适用于App Extension,因此看来FirebaseAuth(以及依赖于它的任何东西,例如Firestore)无法在App Extension中使用.

有什么办法可以解决这个限制吗?

解决方案

更新:

Firebase确认此修复程序针对5.2.x版本.跟踪Github 问题以获取最新更新.


似乎Firebase并未正式支持iOS中的扩展.我从GitHub 问题获取了该信息(请参阅paulb777的答案) .也许来自Firebase的人也可以在这里确认这一点.我很惊讶我们在创建扩展(例如Today小部件)时无法使用Firebase SDK.

我唯一的解决方法是通过以下方式还原到Firebase的早期版本:

pod 'Firebase', '4.9.0'

这使用Firebase SDK的4.9.0版本,不会产生编译器错误.

FirebaseAuth uses [UIApplication sharedApplication] in FIRAuth.m. Since that API is not available to App Extensions, it appears that FirebaseAuth (and anything that depends on it, such as Firestore) can not be used in an App Extension.

Is there any way around this limitation?

解决方案

Update:

Firebase confirms that a fix is targeted for 5.2.x version. Track the Github issue for latest updates.


It seems as Firebase is not officially supporting extensions in iOS. I have got that info from this GitHub issue (see paulb777's answer). Maybe someone from Firebase can also confirm this here. I am very surprised that we can't use Firebase SDK when creating extensions such as a Today widget.

The only workaround I had was reverting back to an earlier version of Firebase via:

pod 'Firebase', '4.9.0'

This uses the 4.9.0 version of the Firebase SDK and doesn't create compiler errors.

这篇关于FirebaseAuth 5.0.x可以在iOS应用扩展中使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆