FCM适用于Firebase v3.4.1,但不适用于v5.8.1

时间:2018-09-24 07:19:53

标签: swift xcode firebase cocoapods firebase-cloud-messaging

基于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接收消息,已发送但在设备上未收到的消息

我需要帮助。谢谢

0 个答案:

没有答案