Open ScottWaring opened 4 years ago
@ScottWaring This isn't an issue with the plugin, but rather a limitation introduced by Apple with the new local notification framework. The only real workaround is to convert the repeating notification to a series of individual notifications based on the trigger schedule. This is less-than-ideal for a number of reasons, but if you need to be able schedule a repeating notification in the future, I'm not sure there's another solution.
The
trigger.after
feature works for Android, pushing the notifications only after the time if the key exists. Sincetrigger.after
doesn't exist for iOS, notifications fire in iOS when they aren't needed.What is the way to achieve the behavior of
trigger.after
in iOS?MY Environment
package.json: "@ionic-native/local-notifications": "^5.0.0",
Ionic: Ionic CLI : 5.4.13 Ionic Framework : @ionic/angular 4.11.0 @angular-devkit/build-angular : 0.801.3 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0
Cordova: Cordova CLI : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.5.3, (and 21 other plugins)
Utility: cordova-res : 0.8.1 native-run : not installed
System: NodeJS : v10.15.1 npm : 6.13.4 OS : macOS Mojave
HOW IM BUILDING NOTIFICATIONS:
if the user has completed the 'task' then the notification is updated this way:
Expected Behavior
Notifications should not fire before
after
date time.Actual Behavior
Android behaves as expected: notifications cease to fire before
after
date time. iOS does not behave as expected: notifications continue to fire beforeafter
date time.