swift - FCM 适用于 Firebase v3.4.1,但不适用于 v5.8.1
问题描述
基于 swift 3.2 制作了一个新项目。并使用了这个 pod 文件:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'PushNotifs' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for PushNotifs
pod 'Firebase/Core'
pod 'Firebase/Messaging'
end
现在我把这个应用程序推送到我的 iPhone 6S 上进行测试。并发送了一条消息。有效。
几分钟后,基于 swift 4.0 创建了一个新项目并使用了这个 podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Push 7' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Push 7
# Pods for PushNotifs
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Database'
pod 'Firebase/Firestore'
pod 'Firebase/Auth'
pod 'GRDB.swift', '2.10.0'
pod 'Alamofire'
pod 'DeckTransition', '~> 2.0'
pod 'Fabric', '~> 1.7.9'
pod 'Crashlytics', '~> 3.10.5'
pod 'SCLAlertView'
end
后来做了一个pod install
并得到以下回复:
Analyzing dependencies
Removing GoogleToolboxForMac
Downloading dependencies
Installing Alamofire (4.7.3)
Installing BoringSSL (10.0.6)
Installing Crashlytics (3.10.7)
Installing DeckTransition (2.1.0)
Installing Fabric (1.7.11)
Installing Firebase 5.8.1 (was 3.14.0)
Installing FirebaseAnalytics 5.1.4 (was 3.7.0 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing FirebaseAuth (5.0.4)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore 5.1.3 (was 3.5.1 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing FirebaseDatabase (5.0.3)
Installing FirebaseFirestore (0.13.3)
Installing FirebaseInstanceID 3.2.1 (was 1.0.9 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing FirebaseMessaging 3.1.2 (was 1.2.2 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing GRDB.swift (2.10.0)
Installing GTMSessionFetcher (1.2.0)
Installing GoogleAppMeasurement (5.1.4)
Installing GoogleUtilities (5.3.0)
Using Protobuf (3.6.1)
Installing SCLAlertView (0.8)
Installing gRPC (1.14.0)
Installing gRPC-C++ (0.0.3)
Installing gRPC-Core (1.14.0)
Installing gRPC-ProtoRPC (1.14.0)
Installing gRPC-RxLibrary (1.14.0)
Installing leveldb-library (1.20)
Installing nanopb (0.3.8)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 11 dependencies from the Podfile and 27 total pods installed.
现在我假设我有firebase v5.8.1。出色地。现在我无法通过 FCM 接收消息,消息已发送但在设备上未收到
我需要帮助。谢谢
解决方案
推荐阅读
- c# - 如何在 C# 中将 Base64 字符串转换为视频
- google-apps-script - 我必须发送电子邮件从某些列中获取数据。如果电子邮件重复,我只想发送一封电子邮件,其中包含其他单元格中的值
- powershell - Out-GridView 在仅显示选定属性时返回完整对象
- amazon-web-services - 亚马逊 alb 和基本身份验证
- java - 我如何单击按钮来创建页面 selenium webdriver
- python - selenium.common.exceptions.WebDriverException:消息:GeckoDriver Firefox 和 Selenium 在 Raspberry Pi debian 上的连接被拒绝错误
- r - 创建一个函数以在 R 中自动构建特定图
- reactjs - 什么应该触发获取反应?用户操作、状态变化或缺少有效数据?
- html - 如何在 bootstrap-4 中删除 div 的上边距
- javascript - 基本的 For 循环 Javascript 未触发