IOS Notification Permission alert does not show

    1. SDK Version: 39.0.0
  1. Platforms(Android/iOS/web/all): All

I am not getting the accept or decline notifications permissions alert when loading my app in production.

I have tried clearing certificates and keys and allowing expo to add everything from a clean slate, but still no luck. I am starting to think maybe it’s my code which is the reason why the alert doesn’t get fired.

import Constants from "expo-constants";
import * as Notifications from "expo-notifications";
import { Permissions } from "expo-permissions";
import { Notifications as Notifications2 } from "expo";

  handleNotification: async () => ({
    shouldShowAlert: true,
    shouldPlaySound: true,
    shouldSetBadge: false

export default class LoginScreen extends React.Component {
  state = {
    email: "",
    password: "",
    notification: {},
    errorMessage: null

  async componentDidMount() {
    Notifications2.addListener(data => {
      this.setState({ notification: data });


  _handleNotification = notification => {
    this.setState({ notification: notification });

  _handleNotificationResponse = response => {

  handleLogin = async () => {
    try {
      const { email, password } = this.state;

      const expoPushToken = await Notifications.getExpoPushTokenAsync();


      const userinfo = await firebase
        .signInWithEmailAndPassword(email, password);
      console.log("user ID ", userinfo.user.uid);

      await firebase
          expo_token: expoPushToken["data"]
        .then(function() {
          console.log("token successfully updated!");
        .catch(function(error) {
          // The document probably doesn't exist.
          console.error("Error updating document: ", error);
    } catch (error) {
      console.log("=======Error in login", error);
      this.setState({ errorMessage: error.message });

  registerForPushNotificationsAsync = async () => {
    if (Constants.isDevice) {
      const { status: existingStatus } = await Permissions.getAsync(
      let finalStatus = existingStatus;
      if (existingStatus !== "granted") {
        const { status } = await Permissions.askAsync(
        finalStatus = status;
      if (finalStatus !== "granted") {
        alert("Failed to get push token for push notification!");
      const token = await Notifications.getExpoPushTokenAsync();
      //this.setState({ expoPushToken: token });
    } else {
      alert("Must use physical device for Push Notifications");

    if (Platform.OS === "android") {
      Notifications.setNotificationChannelAsync("default", {
        name: "default",
        importance: Notifications.AndroidImportance.MAX,
        vibrationPattern: [0, 250, 250, 250],
        lightColor: "#FF231F7C"

Have you ever been able to see it? One potential gotcha is that Apple doesn’t let you just keep asking the user for permission - they only let you do it the first time. So if you haven’t, you’ll probably want to straight up delete your app and get it reinstalled and see if that makes a difference.

Also, do you know if anything properly loads? I’m surprised your code snippet doesn’t have a render function anywhere (but maybe you removed it since it wasn’t pertinent?).

No, it’s never shown in either development or production, it went over my head because I could receive notifications in development. Yes removed render as didn’t think it was necessary to show.

Yes I know about Apple only allowing the permission once. I have tried on three different phones and also reinstalled app as well as clear certificates and upload new ones and submitted new builds.

Ahh, strange. I’m all out of guesses then. If I remember correctly, I was able to get push tokens without having the proper certificates (though the certificate is needed to send notifications). Best luck figuring it out.

I figured it out wasn’t anything to do with notifications. I went back to development looked at logs and had a warning [evaluating ‘_expo.Permission.askAsync’)]

I changed

import { Permissions } from “expo-permissions”;


import * as Permissions from ‘expo-permissions’;

did a quick OTA and the alert popped up, tested a notification and it worked!

1 Like

Glad you got things sorted out, @tomm. FYI: You can handle permissions within the Notifications module as well, rather than having to import the Permissions module.

This is true for most other modules that require permissions as well.


1 Like

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