upd: ios fix

This commit is contained in:
2025-07-28 14:10:38 +08:00
parent 0886c56b39
commit 6cdc07af19
12 changed files with 1277 additions and 400 deletions

View File

@@ -11,13 +11,13 @@ import { apiReadOneNotification } from "@/lib/api";
import { pushToPage } from "@/lib/pushToPage";
import store from "@/lib/store";
import { useAuthSession } from "@/providers/AuthProvider";
import messaging from "@react-native-firebase/messaging";
import { Redirect, router, Stack } from "expo-router";
import { StatusBar } from 'expo-status-bar';
import { useEffect } from "react";
import { Text } from "react-native";
import { Easing, Notifier } from 'react-native-notifier';
import { Provider } from "react-redux";
import firebase from '@react-native-firebase/app';
export default function RootLayout() {
const { token, decryptToken, isLoading } = useAuthSession()
@@ -33,7 +33,7 @@ export default function RootLayout() {
}
useEffect(() => {
const unsubscribe = messaging().onMessage(async remoteMessage => {
const unsubscribe = firebase.app().messaging().onMessage(async remoteMessage => {
const id = remoteMessage?.data?.id;
const category = remoteMessage?.data?.category;
const content = remoteMessage?.data?.content;