![](/img/trans.png)
[英]Android FirebaseMessaging Service onMessageReceived called twice
[英]Cannot import FirebaseMessaging in Service Extension target
我有一個 SwiftUI 項目,我在項目級別使用“添加包”添加了 Firebase 依賴項。
然后我可以將“import FirebaseMessaging”放入 swift 文件中,它會毫無錯誤地構建,所以我知道正確添加了依賴項。
然后我通過轉到文件 > 新建 > 目標並添加通知服務擴展來添加 UNNotificationServiceExtension。
現在,在同一項目的新目標中的代碼中,“import FirebaseMessaging”將無法解決。
If I right click on the service extension and select 'Add Package', it will not allow me to add the firebase sdk package to the service extension, as it is already added to the project.
如何將 Firebase 依賴項添加到我的服務擴展目標中?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.