Summary:
In a development build using expo-dev-client
, I’ve set the proper UIBackgroundModes
in the ios infoPlist
array and created a fresh build. I validated that the resulting build does have the correct UIBackgroundMode
set ('remote-notification'
). But I receive the warning that Background remote notifications have not been configured.
Details:
Relevant part of app.config.ts
// removed extra configuration items for clarity
const AppConfig: ExpoConfig = {
ios: {
infoPlist: {
// 'remote-notification' is the only Background Mode I need right now
UIBackgroundModes: ['remote-notification'],
},
},
}
export default AppConfig;
Warning is thrown when registering the background notification task after setting it up with TaskManager
(on the global scope):
await Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);
The exact warning received in console:
Error: Background remote notifications have not been configured. To enable it, add `remote-notification` to `UIBackgroundModes` in the application's Info.plist file.
However, the build’s info.plist
show that this has successfully been configured:
Things I’ve tried:
- Creating another fresh development build to be sure the configuration was set correctly in native code