FIRMessaging委托错误 [英] FIRMessaging Delegate Error
本文介绍了FIRMessaging委托错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试添加FIRMessagingDelegate,但Xcode提供了一个错误。
无法找到FIRMessagingDelegate的协议声明
p>
我导入了FirebaseMessaging,并且没有提供任何错误。安装Firebase(3.2.1)
使用FirebaseAnalytics(3.2.0)安装Firebase(3.2.1)
安装Firebase(3.2.1)
使用FirebaseAnalytics(3.2.0)
使用FirebaseInstanceID(1.0.6)
安装FirebaseMessaging(1.1.0)
我如何实现;
#import< UIKit / UIKit.h>
#import< UserNotifications / UserNotifications.h>
#import< MessageUI / MessageUI.h>
#if defined(__ IPHONE_10_0)&& __IPHONE_OS_VERSION_MAX_ALLOWED> = __IPHONE_10_0
@import UserNotifications;
#endif
@import Firebase;
@import FirebaseInstanceID;
@import FirebaseMessaging;
@interface AppDelegate:UIResponder< UIApplicationDelegate,UNUserNotificationCenterDelegate,FIRMessagingDelegate>
我找不到任何解决方法,错误原因是什么?
解决方案
豆荚更新了,所以我再次尝试。现在它没有问题。
I tried to add FIRMessagingDelegate but Xcode gives an error
Cannot find protocol declaration for FIRMessagingDelegate.
I imported FirebaseMessaging and it gives no errors. I checked pods and it seems fine.
Installing Firebase (3.2.1)
Using FirebaseAnalytics (3.2.0)
Using FirebaseInstanceID (1.0.6)
Installing FirebaseMessaging (1.1.0)
How I try to implement;
#import <UIKit/UIKit.h>
#import <UserNotifications/UserNotifications.h>
#import <MessageUI/MessageUI.h>
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
@import UserNotifications;
#endif
@import Firebase;
@import FirebaseInstanceID;
@import FirebaseMessaging;
@interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate, FIRMessagingDelegate>
I could not find any solution, what could be the reason for error?
解决方案
Pods are updated so I tried it again. Now it works without problem.
这篇关于FIRMessaging委托错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文