V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
iwasthere
V2EX  ›  问与答

麻烦懂 ios 的进来帮忙看下

  •  
  •   iwasthere · Jun 6, 2020 · 2179 views
    This topic created in 2163 days ago, the information mentioned may be changed or developed.

    //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 replies    2020-10-21 15:53:55 +08:00
    CDuXZMAPgHp1q9ew
        1
    CDuXZMAPgHp1q9ew  
       Jun 6, 2020
    改成 #import <RNCPushNotificationIOS/RNCPushNotificationIOS.h> 试下?
    CDuXZMAPgHp1q9ew
        2
    CDuXZMAPgHp1q9ew  
       Jun 6, 2020   ❤️ 1
    或者 #import <PushNotificationIOS/RNCPushNotificationIOS.h>
    iwasthere
        3
    iwasthere  
    OP
       Jun 7, 2020 via iPhone
    @wujichao 感谢老哥的回复,问题后来解决了,谢谢
    toacnme
        4
    toacnme  
       Oct 21, 2020
    咋解决的啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3038 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 13:35 · PVG 21:35 · LAX 06:35 · JFK 09:35
    ♥ Do have faith in what you're doing.