React native Expo通知仅在打开应用程序时显示[仅限IOS]

React native Expo通知仅在打开应用程序时显示[仅限IOS],ios,react-native,expo,Ios,React Native,Expo,当IOS应用程序在后台运行时,Expo通知不会显示,但仅在我打开应用程序时显示。不过Android上的一切似乎都很好 Notifications.setNotificationHandler({ handleNotification: async () => ({ shouldShowAlert: true, shouldPlaySound: true, shouldSetBadge: true, }), }); 这是我初始化通知处理程序的地方 这就是我安

当IOS应用程序在后台运行时,Expo通知不会显示,但仅在我打开应用程序时显示。不过Android上的一切似乎都很好

Notifications.setNotificationHandler({
  handleNotification: async () => ({
    shouldShowAlert: true,
    shouldPlaySound: true,
    shouldSetBadge: true,
  }),
});
这是我初始化通知处理程序的地方 这就是我安排通知的地方

const noti1 = Notifications.scheduleNotificationAsync({
  content: {
    title: 'New Student Requests',
    body: "New students have posted tutoring requests",
  },
  trigger: null,
});
最后,我还在ComponentDidMount上运行此函数

askPermissions = async() => {
  await Permissions.askAsync(Permissions.NOTIFICATIONS)
}
任何帮助我都很感激