Error: this app does not have permission to show notifications

#1

Hi,
Do not know why, but now app shows warning Error: this app does not have permission to show notifications in iOS. Android is fine, when trying using real devices

let { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS);
is returning ‘granted’

Thanks

#2

Hey @imo,

Just making sure, are you testing on a physical iOS device? Push Notifications do not work on simulators.

Cheers,

Adam

#3

I am using a iPhone with Expo app installed on it. I am opening app through expo app

Untill some minuts ago everyting was fine but now the 2 warnings appear saying the same, and no notifications are received. this app does not sends notifications. It receives only.

#4

Hi, I’m having the same problem. Any news on this?

#5

Hey @imo,

I just dug through the source of the expo client and found where this error is being thrown.
There is also something in the docs about permissions for ios notifications being weird.
I’m not sure exactly why it’s showing granted for you, can you reproduce the error at all?? Also make sure the app has permissions in your system settings.
There is a cool way to open to this in app using the Linking API -> https://snack.expo.io/@bacon/permission-rematch-example

import { Linking } from 'react-native';
export default () => {
  Linking.canOpenURL('app-settings:')
    .then(supported => {
      if (!supported) {
        console.warn("Can't handle settings url");
      } else {
        return Linking.openURL('app-settings:');
      }
    })
    .catch(err => console.error('An error occurred', err));
};

closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.