Use of unresolved identifier 'Messaging', 'MessagingDelegate', 'MessagingRemoteMessage'

Viewed 2505

Yesterday I cleared the Derived data folder enitrely and started facing this error.

I tried :

  1. Clearing Derived Data and Clean and rebuild
  2. Deleting all pods using pod deintegrate and reinstall using pod install
  3. Deleting the Podfile.lock file
  4. Run pod update to update the pods

My podfile contains these Firebase pods:

  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'Firebase/Firestore'
  pod 'Firebase/Database' 

But the error still remains. Anyone faced this error lately.

enter image description here

2 Answers

Simply explicitly import 'FirebaseMessaging' in your project, I had to call it explicitly to make it work.

import FirebaseMessaging

Open your project, in Project Navigator click on Pods.xcodeproj and in a targets list check if your pod is installed. If it is not then pods are not installed properly or Firebase might removed it because it was deprecated.

Related