iwasthere
V2EX  ›  问与答

麻烦懂 ios 的进来帮忙看下

  •  
  •   iwasthere · Jun 6, 2020 · 2209 views
    This topic created in 2175 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   ·   2848 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 15:14 · PVG 23:14 · LAX 08:14 · JFK 11:14
    ♥ Do have faith in what you're doing.