Member-only story
Daily Reminder Feature using DatePicker and Local Notification in SwiftUI
Non-Medium Members can read the full story here.
Let’s say you want to implement a daily reminder or something similar within your app with local notification. That’s definitely possible in SwiftUI, and it’s easier than you think!
What is Local Notification?
Local notification is basically a notification system that we can implement directly within the app, and without relying on a server. It’s ideal for things like a daily reminder, etc.
The major difference between local notification and remote notification is that in remote notification, we rely on our server backend to send a notification to a specific device token. For local notifications, we can either send a one-time-only notification, or a repeated notification.
The Main Idea
There are things to consider while implementing local notification.
- Does the notification repeat? be it daily, weekly, or monthly? Or one-time only?
- If it’s repeated, can the user set their own schedule? And if it’s not repeated, on what occasion will the notification arrive to the user?
- If the notifications are repeated and the user can set their schedule, how…