FCM работает с Firebase v3.4.1, но не с v5.8.1 - PullRequest
0 голосов
/ 24 сентября 2018

Сделан новый проект на основе Swift 3.2.и использовал этот файл:

# 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 и использовал этот подфайл:

 # 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, сообщение отправлено, но не получено на устройстве

Мне нужна помощь.Спасибо

...