Notifications Property List Key Only Works For Simulator

I tried to setup custom text for my app's push notifications permission alert by setting the NSUserNotificationsUsageDescription key in the info plist. It works flawlessly when I run the app on simulator, but running the app on a physical device still shows the default text provided by Apple. Is this a bug by Apple or am I doing something wrong? I am trying this with Xcode 13.4.1.

Replies

I have recently found that the message assigned to the NSUserNotificationsUsageDescription key is ignored on some devices and works as desired on others. In my tests it worked correctly on a device running iOS 15.5 but the generic message was shown on a device running iOS 14.8.1. My tests were with Xcode 13.4.