Productivity & personal

Build a birthday reminder app with a widget (native iPhone)

A native iPhone build brief that reads birthdays from the contacts you choose, reminds you the day before and shows who is next on a home screen widget.

Apirex TeamUpdated AndroidiOS
On this page
  1. Screens
  2. Data model
  3. Native features
  4. Android notes (Kotlin and Jetpack Compose)
  5. iPhone notes (Swift and SwiftUI)
  6. Copy-paste prompt
  7. Acceptance test
  8. Frequently asked questions
5screens
3data tables
155word prompt
2platforms: Android, iOS

Forgetting a best friend's birthday and finding out from their story at 11pm is a special kind of pain. This brief builds a quiet fix: pull birthdays from the contacts you allow, add the ones your contacts are missing, get a reminder the day before and the morning of, and keep the next three birthdays on your home screen. The best fit is native iPhone, where the Contacts framework, local notifications and WidgetKit do all the work offline; building it needs a Mac with Xcode. The Android version reads birthdays from the contacts provider and shows a Glance widget. The first proof: a test contact with tomorrow's birthday triggers a reminder and appears first on the widget.

Screens

  • Upcoming: The next birthdays in order, with days left, the age they are turning if the year is known and a quick message button.
  • Import: Choose which contacts to read birthdays from, with a clear count of what was found.
  • Add person: A name, a day and month, an optional year and a note such as gift ideas.
  • Reminders: Day before, on the day, a week before for close friends and the reminder time.
  • Widget setup: How to add the next-birthdays widget, with a live preview.

Data model

Birthday records stored on the phone
TableKey fieldsPurpose
peopleid (uuid), contact_id (text), display_name (text), birth_month (int), birth_day (int), birth_year (int)Everyone whose birthday is tracked, linked to a contact when it came from one.
reminder_rulesperson_id (uuid), days_before (int[]), remind_at (time)Which reminders each person gets; close friends can get an extra week-before ping.
notesid (uuid), person_id (uuid), text (text), updated_at (timestamptz)Gift ideas and plans, never sent anywhere.

Birthdays are personal data about other people, so they stay on the phone with no account and no upload. Copy only the name, date and contact identifier from the address book, not phone numbers or emails. Treat 29 February carefully: decide with the owner whether non-leap years remind on 28 February or 1 March. If cross-device sync becomes a request, connect your own Supabase with row-level security, and explain plainly that friends' birthdays will then leave the phone.

Native features

Two system limits shape the design. Contacts access can be full or limited to chosen people on recent iOS versions, so import must work with whatever the user grants. And iOS keeps only a limited number of pending local notifications per app, so the app schedules the next batch of reminders and tops them up each time it opens, rather than scheduling a whole year at once.

FeatureAndroid (Kotlin)iPhone (SwiftUI)Notes
Reading birthdaysContactsContract Event rows with TYPE_BIRTHDAYCNContactStore fetching the birthday keyAsk for contacts access with a reason; manual entry must work if it is denied.
RemindersWorkManager daily check posting notificationsUNCalendarNotificationTrigger per upcoming reminderSchedule only the next batch and refresh on every launch.
Next birthdays widgetJetpack Glance widget with the next three peopleWidgetKit timeline that updates at midnightShow days left, not just dates, so it reads at a glance.
Wish themIntent to the messaging app of choiceMessages compose sheet or a share sheetPrefill a short message the user edits; never send anything automatically.

Android notes (Kotlin and Jetpack Compose)

On Android, query the contacts provider for birthday events once at import, normalise dates that come with or without a year, and store them in Room. Run one daily WorkManager job that posts any reminders due today, which is simpler than scheduling hundreds of alarms.

  • Request READ_CONTACTS only when the user taps Import, and handle the birthday formats contacts apps store, including dates with no year, before saving.
  • Create the Glance widget from a Room query of the next three people by days left, and update it from the daily job so the count rolls over each morning.
  • On a real phone, add a contact with a birthday tomorrow, import, and check the reminder appears at the chosen time and the widget shows that person first.

iPhone notes (Swift and SwiftUI)

On iPhone, CNContactStore can fetch names and birthdays for the contacts the user shares, and limited access means the list may be partial by design. WidgetKit reads the same SwiftData store through an App Group.

  • Fetch with keysToFetch limited to the name and birthday keys, and offer a button to share more contacts later instead of asking for everything up front.
  • After every import or edit, cancel and reschedule only the next 60 or so pending notifications, keeping room under the system limit, and reschedule again when the app becomes active.
  • Test on a physical iPhone with limited contacts access, a contact with no birth year and a 29 February birthday, and confirm each shows and reminds correctly.

Copy-paste prompt

Build this yourself 153 words · Android
I keep forgetting my friends' birthdays and finding out from their stories. Build a birthday reminder app for Android. Screens: Upcoming, Import, Add person, Reminders and Widget setup. Read birthdays only from the contacts I allow, copy just the name and date, and let me add people manually with or without a birth year. Remind me the day before and on the morning, plus an extra week-before ping for close friends, at a time I choose. Add a home screen widget showing the next three birthdays with days left. Let me save gift ideas per person and tap to open a prefilled message, but never send anything automatically. Keep everything on my phone, no account. Handle denied contacts access, missing years and 29 February. Schedule reminders in small batches and refresh them every time I open the app. Acceptance: a contact with tomorrow's birthday sends a reminder and shows first on the widget.

Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.

Acceptance test

  1. Grant limited contacts access to three people, one with a birthday tomorrow, and import them.
  2. Confirm Upcoming lists the tomorrow person first with one day left and the widget shows the same order.
  3. Wait for the reminder at the chosen time and tap it; the app should open on that person with the message button ready.
  4. Add a person manually with no birth year and a 29 February date, and check the rule the owner chose is applied.
  5. Deny contacts access completely and confirm manual entry, reminders and the widget all still work.

Leave the app closed for a few days during testing, then open it and check that reminders kept arriving and that the next batch was rescheduled. A birthday app fails silently, so it is worth logging the date of the last successful schedule refresh in a debug screen.

Frequently asked questions

Does it upload my contacts?

No. It reads only names and birthdays from the contacts you choose and keeps them on the phone. Nothing is sent to a server unless you deliberately add sync with your own Supabase later.

Will it work if my contacts have no birthdays saved?

Yes. You can add people by hand with just a day and month, and the app treats them exactly like imported birthdays.

Why is iPhone the best fit?

The Contacts framework, local notifications and WidgetKit cover the whole idea without any server. Building the iPhone version needs a Mac with Xcode; the Android version with a Glance widget works the same way.

Build this blueprint

The blueprint prompt, ready for your platform. Edit anything before you send it.

AndroidKotlin · Jetpack ComposeReal source on your computer

Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.