简体   繁体   English

Firebase.configure() 停止 AppDelegate:OpenUrl() 被调用

[英]Firebase.configure() stops AppDelegate:OpenUrl() from being called

If FirebaseApp.configure() is added to didFinishLaunchingWithOptions() (which is where it is supposed to go according to the documentation, then if the application is not in the background and something launches it via a url then如果 FirebaseApp.configure() 被添加到 didFinishLaunchingWithOptions() (根据文档应该是 go 的位置,那么如果应用程序不在后台并且某些东西通过 url 启动它然后

public func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool

will not get called.不会被调用。

But as soon as FirebaseApp.configure() is removed, then OpenURL() will be called.但是一旦 FirebaseApp.configure() 被删除,就会调用 OpenURL()。 So adding FirebaseApp.configure() is interfering with the standard launching/opening actions for the app.因此,添加 FirebaseApp.configure() 会干扰应用程序的标准启动/打开操作。

How is one supposed to use Firebase/Crashlytics if certain functionality of your app is reliant on OpenURL() getting called but Firebase.configure() prevents it from doing so?如果您的应用程序的某些功能依赖于调用 OpenURL() 但 Firebase.configure() 阻止它这样做,那么应该如何使用 Firebase/Crashlytics?

It might be that Firebase uses method swizzling.可能是 Firebase 使用方法混合。

Try setting FirebaseAppDelegateProxyEnabled to NO in your info.plist and see it if works.尝试在 info.plist 中将 FirebaseAppDelegateProxyEnabled 设置为 NO 并查看它是否有效。

<key>FirebaseAppDelegateProxyEnabled</key>
<false/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM