简体   繁体   English

使用未声明的类型'MessagingDelegate'

[英]Use of undeclared type 'MessagingDelegate'

I have implemented FCM successfully. 我已成功实施FCM。 Now I wanted to send the Notification on device. 现在我想在设备上发送通知。 I was fooilowing tutorial given on FCM console themselves. 我自己在FCM控制台上给出了教程。

For this I moved forward in ther tutorial but found errors as shown in picture below ... 为此,我在教程中向前推进,但发现错误如下图所示......

在此输入图像描述

I do not know why I am getting this error. 我不知道为什么我会收到这个错误。 However as I wanted to remove that error but fails. 但是,因为我想删除该错误但失败了。 I do not know why they are coming. 我不知道他们为什么要来。 `i even copy paster their own example project app delegate methods. `我甚至复制贴纸他们自己的示例项目应用程序委托方法。 But still I am getting those error which I showed in picture. 但我仍然得到了我在图片中显示的那些错误。

I have imported following thing 我已经导入了以下内容

import UIKit
import UserNotifications
import Firebase

here is my pod file 这是我的pod文件

# Uncomment the next line to define a global platform for your project
 platform :ios, '9.0'

target 'MyProject' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for MyProject
pod 'Firebase/Core'

end

What is problem please rectify 有什么问题请整顿

you just need to update the pod file; 你只需要更新pod文件;

pod 'Firebase/Core'
pod 'Firebase/Messaging'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM