Files
daily-notification-plugin/docs/GETTING_STARTED.md
Matthew Raymer 4a457fa788 feat(docs): P3.4-C Add getting started guide
Created docs/GETTING_STARTED.md with:
- Installation instructions (npm/yarn/pnpm)
- Platform setup (iOS and Android)
- Basic usage examples
- Links to authoritative documentation
- Next steps and support resources

Updated docs/00-INDEX.md to link getting started guide.

Verification:
- Documentation created and linked 
- Follows established doc structure 
2025-12-23 07:26:17 +00:00

3.4 KiB

Getting Started

Purpose: Step-by-step installation and setup guide for Daily Notification Plugin.
Owner: Development Team
Last Updated: 2025-12-22
Status: active


Installation

npm

npm install @timesafari/daily-notification-plugin

yarn

yarn add @timesafari/daily-notification-plugin

pnpm

pnpm add @timesafari/daily-notification-plugin

Platform Setup

iOS

  1. Add to Info.plist:
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
  <string>com.timesafari.dailynotification.fetch</string>
</array>
  1. Register background task in AppDelegate.swift:
import BackgroundTasks

func application(_ application: UIApplication, 
                didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  BGTaskScheduler.shared.register(forTaskWithIdentifier: "com.timesafari.dailynotification.fetch", 
                                  using: nil) { task in
    // Handle background fetch task
  }
  return true
}

Android

  1. Add permissions to AndroidManifest.xml:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
  1. Register WorkManager in Application.kt:
import androidx.work.Configuration
import androidx.work.WorkManager

class MyApplication : Application() {
  override fun onCreate() {
    super.onCreate()
    WorkManager.initialize(
      this,
      Configuration.Builder()
        .setMinimumLoggingLevel(android.util.Log.INFO)
        .build()
    )
  }
}

Basic Usage

1. Import the Plugin

import { DailyNotification } from '@timesafari/daily-notification-plugin';

2. Request Permission

const { state } = await DailyNotification.requestPermission();
if (state !== 'granted') {
  console.error('Notification permission denied');
  return;
}

3. Create a Schedule

const { schedule } = await DailyNotification.createSchedule({
  id: 'morning-notification',
  kind: 'notify',
  clockTime: '09:00',
  enabled: true
});

4. Verify Schedule

const { schedules } = await DailyNotification.getSchedules();
console.log('Active schedules:', schedules);

Next Steps


Authoritative Documentation


Support

For issues, questions, or contributions:

  1. Check Troubleshooting Guide
  2. Review System Invariants
  3. Check Progress Documentation for current status

See also: