V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
iwasthere
V2EX  ›  问与答

麻烦懂 ios 的进来帮忙看下

  •  
  •   iwasthere · 2020-06-06 18:21:34 +08:00 · 1791 次点击
    这是一个创建于 1419 天前的主题,其中的信息可能已经有所发展或是发生改变。

    //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,希望懂的朋友能告知下,哪里的问题,我改怎么操作?

    4 条回复    2020-10-21 15:53:55 +08:00
    wujichao
        1
    wujichao  
       2020-06-06 20:53:01 +08:00
    改成 #import <RNCPushNotificationIOS/RNCPushNotificationIOS.h> 试下?
    wujichao
        2
    wujichao  
       2020-06-06 20:54:13 +08:00   ❤️ 1
    或者 #import <PushNotificationIOS/RNCPushNotificationIOS.h>
    iwasthere
        3
    iwasthere  
    OP
       2020-06-07 18:03:35 +08:00 via iPhone
    @wujichao 感谢老哥的回复,问题后来解决了,谢谢
    toacnme
        4
    toacnme  
       2020-10-21 15:53:55 +08:00
    咋解决的啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1473 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 17:21 · PVG 01:21 · LAX 10:21 · JFK 13:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.