IOS Push Notification Permission Delay

Hello ,
How can i delay the request permission for the push notification on IOS (keeping in mind im just using FIrebase for just downstream messages no upstream so just a code for request token )?
I have made researches all are saying i cant delay.
If i can request a prompt for request permission can i atleast disable the auto request on app start?

Thanks alot in advance !

You’re in complete control of when you call RegisterForNotifications. I call it after the player has made some progress into the game.

and what about the request on app start can i disable it?

You’re talking about the popup that asks if you want to allow notifications right?

If you’re not calling RegisterForNotifications explicitly then you must have some third-party code that’s doing it on startup.

Yes i want to disable the push notification request permission popup on start up (Still searching for a way).

and request it when i need it ( as you said the RegisterForNotification can prompt the popup when needed)

Hello LayalFakih, did you ever solve this issue?

I just added Firebase Messaging to my project. No matter what I do, even if I strip my all code, on iOS the app asks for push notification permission on start.
Using this line changes nothing:

Firebase.Messaging.FirebaseMessaging.TokenRegistrationOnInitEnabled = false;

In my Xcode pods project, I have this added to my Info.plist as boolean:

FirebaseMessagingAutoInitEnabled = NO

Please, can anyone give some info on this topic?

Did you find any solution to this? Im having the same Issue, I want to ask user later when they have used my game for some time to allow notifications, but firebase keep triggering the popup at start

1 Like

I have this problem too. Did you guys find a solution?

This delays the initialization of the identifier token to the FCM backend. It has nothing to do with push notifications.

Any updates? 2 years have passed since this discussion and we are wondering the same as we are using FireBase.

I think I’ve found the solution:
After you build the project for Xcode
Open the Info.plist file in the generated iOS project
There should be a variable in there called UnityNotificationRequestAuthorizationOnAppLaunch which is a Boolean value, by default it is set to 1. Set it to 0 and it should stop asking to show notifications automatically on launch.
Now you can manually ask for push notification permission when you want within your game.

Open Project Settings in Unity, find notifications there and you’ll have a checkbox in there :slight_smile:

2 Likes