【发布时间】:2018-08-30 04:01:55
【问题描述】:
我已经通过firebase项目(命名为:A项目)构建了一个iOS应用程序。然后我的
iOS 应用可以通过 A 项目收到通知。
任何解决方案都可以让我的 iOS 应用收到通知表单 firebase
项目(名称:B项目)?
我的带有 A 项目的 iOS 应用程序可以使用 B 项目读取/写入实时数据库
通过设置「FirebaseOptions」。
所以任何其他人都可以帮助我了解如何接收来自 B 的通知 项目?
我的代码如下:
// [END register_for_notifications],Default configuration with A project
FirebaseApp.configure()
// Load a named file. another configuration with B project
let filePath = Bundle.main.path(forResource: "GoogleService-Info-coinExchange2", ofType: "plist")
guard let fileopts = FirebaseOptions(contentsOfFile: filePath!)
else { return false }
FirebaseApp.configure(options: fileopts)
================
我只在运行时选择一种配置。如何在运行时包含双重配置?(因为 FirebaseApp.configure 只能初始化一次。)
【问题讨论】:
标签: ios firebase firebase-realtime-database notifications firebase-cloud-messaging