I’m using the exact same code as registerForPushNotificationsAsync
in here https://docs.expo.io/versions/latest/guides/push-notifications
When someone click on a button, this function is called
async setPushNotification() {
try {
console.log('can see this ')
const pushToken = await registerForPushNotificationsAsync()
console.log('cant see this ', pushToken)
} catch (e) {
console.log('cant see this ', e)
} finally {
console.log('cant see this')
}
}
Basically i get the prompt AND i click ALLOW, then nothing happens, i set the state in my finally call, removed for sake of clarity. It doesnt fall into the catch either. It does however log the token if i restart the app.
Tested on Sim and iPhone 7, same result. It used to work. Cant see what i’m doing wrong.
"expo": "^29.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
// "sdkVersion": "29.0.0",