Flutter: Push notifications even if the app is closed

For reminders i would recomend Flutter Local Notifications Plugin. It has a powerful scheduling api. From the documentation of local notification: Scheduling when notifications should appear – Periodically show a notification (interval-based) – Schedule a notification to be shown daily at a specified time – Schedule a notification to be shown weekly on a specified … Read more

iOS push notification: how to detect if the user tapped on notification when the app is in background?

OK I finally figured out. In the target settings ➝ Capabilities tab ➝ Background Modes, if you check “Remote Notifications”, application:didReceiveRemoteNotification: will get triggered as soon as notification arrives (as long as the app is in the background), and in that case there is no way to tell whether the user will tap on the … Read more

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later

For iOS<10 – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { //– Set Notification if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)]) { // iOS 8 Notifications [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; [application registerForRemoteNotifications]; } else { // iOS < 8 Notifications [application registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)]; } //— your custom code return YES; } For iOS10 https://stackoverflow.com/a/39383027/3560390

Receiving Push Notifications while in background

application:didReceiveRemoteNotification: will call in the background only when you have added content-available key with value 1 into the notification payload. In case of the Urban Airship, you can send Test Push under the Setting tab. Sample Payload for Push Notifications: { “aps”: { “alert”: “aaaa”, “badge”: “+1”, “content-available”: “1” }, “device_tokens”: [ “86BA71E361B849E8312A7B943BA6B26A74AB436381CF3FEE3CD9EB436A12A292” ] } … Read more

didReceiveRemoteNotification not working in the background

Implementing didReceiveRemoteNotification and didReceiveRemoteNotification:fetchCompletionHandler is the correct way, but you also need to do the following: Make sure to register for remote notifications, see documentation here: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; return YES; } Also make sure to edit Info.plist and check the “Enable Background Modes” and … Read more