Do remote push notifications require to add UIBackgroundModes in Info.plist?

user1960169 picture user1960169 · Aug 1, 2017 · Viewed 52k times · Source

I have integrated remote push notifications, but I am getting this warning:

didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.

My Xcode version is 8.3.1. I really want to add this to Info.plist. I have followed some tutorials as well but they didn't mentioned this either. What should I really do?

Answer

Tamás Sengel picture Tamás Sengel · Aug 1, 2017

Yes, you should enable Background Modes/Remote notifications to be able to use remote notifications for background updates.

The easiest way to do this is via the project settings. Navigate to Targets -> Your App -> Capabilities -> Background Modes and check Remote notifications. This will automatically enable the required settings.

Background Modes dropdown list in Project Settings