Skip to content

iOS App

The iOS companion app is a thin SwiftUI wrapper that hosts the PWA in a WKWebView and adds native push notifications with interactive actions.

What It Adds

  • Real push notifications — Not web push; actual APNs notifications that wake your phone
  • Interactive snooze grid — Long-press a notification for a 3x4 grid of snooze options
  • Lock screen actions — Done, +1hr, and All +1hr buttons directly on the notification
  • Apple Watch support — Handle notification actions on your wrist without reaching for your phone
  • Cross-device sync — Snoozed or completed tasks automatically dismiss notifications on other devices

Prerequisites

  • Apple Developer Program membership ($99/year)
  • APNs configuration on the server (see Notifications)
  • Xcode (for building the app)

Building

The iOS project uses xcodegen to generate the Xcode project from project.yml:

bash
cd ios
xcodegen
open OpenTask.xcodeproj

Targets

TargetDescription
OpenTaskMain app: WKWebView host, first-launch setup, APNs registration
OpenTaskNotificationContent extension: interactive snooze grid on notification long-press
OpenTaskWatchwatchOS companion: handles notification actions on Apple Watch

First-Run Setup

When the app launches for the first time:

  1. Enter your server URL (e.g., https://tasks.example.com)
  2. Enter a Bearer token (create one with npm run db:create-token)
  3. The app validates the connection and stores credentials in the shared Keychain

Credentials are shared via App Group Keychain between the main app, notification extension, and Watch app.

Server Endpoints Used

EndpointPurpose
POST /api/push/apns/registerDevice token registration
POST /api/notifications/actionsDone/snooze from notification actions
PATCH /api/tasks/{id}Snooze to specific time (content extension)
POST /api/tasks/bulk/snooze-overdueBulk snooze from notification action
DELETE /api/push/apns/registerDevice token unregistration
GET /api/user/preferencesConnection validation during setup