I have a problem with the configuration of push notification in IOS. I followed all the steps of the tutorial in the Invertase documentation (https://invertase.io/oss/react-native-firebase/v6/messaging/ios-configure-apns), but it didn't work. I read this article, and followed the steps up to the part of generating a development certificate (https://www.codementor.io/@uokesita/react-native-push-notifications-with-firebase-2019-10on0z19t6#generate-a-development-certificate). My JS code is as follows:
export default class App extends React.Component {
async componentDidMount() {
await messaging().registerForRemoteNotifications()
await messaging().requestPermission().then(async granted =>{
if (granted) {
console.log('User granted messaging permissions!');
if(Platform.OS === "ios"){
console.log("Token: " + await messaging().getToken())
}
} else {
console.log('User declined messaging permissions :(');
}
});
}
render() {
return (<AppContainer />)
}
}
Would anyone know to tell me why the notification does not want to appear? And when I request the Token as shown in the code below, the following error also appears:
[messaging/unknown] The operation couldn’t be completed. (com.firebase.iid error 1001.)