I am new to react native and I am trying to set up push notifications via iOS.
I have installed pushNotificationios and followed the instructions given. I have also signed up as an Apple Developer.
When I run my app the push notifications don't seem to work. When I go into my iPhone settings and click on the app it does not display notifications.
Here is my code
import PushNotificationIOS from '@react-native-community/push-notification-ios';
import PushNotification from "react-native-push-notification";
const configure = () => {
PushNotification.configure({
onRegister: (token) => {
console.log('TOKEN:', token);
//process token
},
onNotification: (notification) => {
// process the notification
console.log("NOTIFICATION:", notification);
// required on iOS only
notification.finish(PushNotificationIOS.FetchResult.NoData);
},
permissions: {
alert: true,
badge: true,
sound: true
},
popInitialNotification: true,
requestPermissions: true,
});
};
export {
configure,
};

