jpush-react-native icon indicating copy to clipboard operation
jpush-react-native copied to clipboard

property 'notification' cannot be found in found in forward class object 'UNNottificationResponse'

Open cashely opened this issue 10 years ago • 5 comments

image

cashely avatar Nov 21 '16 03:11 cashely

?

huangminlinux avatar Nov 21 '16 03:11 huangminlinux

按照readme里面配置ios这一步报错 image

cashely avatar Nov 21 '16 03:11 cashely

应该是没有导入头文件在 appdelegate.h 加入如下代码

#import <RCTJPushModule.h>
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h>
#endif

huangminlinux avatar Nov 21 '16 04:11 huangminlinux

恩,是的 @huangminlinux 为什么在ios模拟器下面会报这个错误呢cannot read property 'init push' of undefined,安卓是没问题的

cashely avatar Nov 21 '16 04:11 cashely

已经明白,还是没仔细看文档,initPush只有安卓才需要,谢谢

cashely avatar Nov 21 '16 04:11 cashely