package.json
“@react-native-firebase/app”:“^18.3.0”, “@react-native-firebase/messaging”:“^18.3.0”,
应用程序.js
firebase.messaging().getInitialNotification().then(message => {
console.log(
'Notification caused app to open from quite state:',
message,
);
if (message != null && message.data) {
Common.handlePushNavigation(this.props.navigation, { type: message.data.type, target: message.data.target });
}
});
iOS 中消息为空。 安卓运行良好。
我尝试更改 firebase 版本,但没有成功。
我正在使用 “@notifee/react-native”:“^7.0.4” 用于前台消息传递进程。
这将 iOS 应用程序的外部通知挂接到它自己的进程中。 所以我将该库版本降级为 5.* 并且运行良好。
这里有任何更新。我也面临这个问题