遵循所有说明here后,永远不会调用didReceiveLocalNotification。
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[RCTPushNotificationManager didReceiveLocalNotification:notification];
}
这会导致听众永远不会开火:
PushNotificationIOS.addEventListener('localNotification', () => {
console.log("never called")
});
正常收到本地通知并调用didReceiveNotificationResponse,但PushNotificationiOS不支持didReceiveNotificationResponse。
如何在iOS 11中使用React native的PushNotificationiOS库?它似乎依赖于调用didReceiveLocalNotification,但它现在已被弃用了一段时间,并且在iOS 11上根本不起作用。我错过了什么?