//AppDelegate.m 文件下
#import <RNCPushNotificationIOS.h>
@implementation AppDelegate
// Required to register for notifications
//这里提示报错了
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
}
报错信息;\’Use of undeclared identifier \’RNCPushNotificationIOS\’
意思是使用了没有声明的变量,但是我顶部引入了(按照包文档操作的,已谷歌奈何没有找到解决办法)
操作根据链接: https://github.com/react-native-community/push-notification-ios
前端菜鸡一枚,正在搞 react native,不懂 ios,希望懂的朋友能告知下,哪里的问题,我改怎么操作?
改成 #import <RNCPushNotificationIOS/RNCPushNotificationIOS.h> 试下?
或者 #import <PushNotificationIOS/RNCPushNotificationIOS.h>
@wujichao 感谢老哥的回复,问题后来解决了,谢谢