Created complete iOS test app project structure:
Project Setup:
- Created package.json with Capacitor dependencies
- Installed Capacitor CLI and iOS platform
- Generated Xcode project (App.xcodeproj, App.xcworkspace)
- Configured Podfile with correct paths
Podfile Configuration:
- Fixed paths to use local node_modules for Capacitor
- Added DailyNotificationPlugin from project root
- Configured for iOS 13.0+ deployment target
Fixed Issues:
- Resolved zsh syntax error (CODE_SIGN_IDENTITY='' instead of "")
- Corrected Podfile paths for Capacitor and plugin
- Created public directory for web assets
Result:
- Pod install successful (3 pods installed)
- Workspace ready for command-line builds
- All files in place for simulator builds
Next: Can now run build scripts or xcodebuild commands
Fixed build error: 'cannot find PersistenceController in scope'
Changes:
- Made PersistenceController class public
- Made shared static property public
- Made container property public
- Made init method public
This allows DailyNotificationPlugin to access PersistenceController
across module boundaries. CocoaPods pod install was required to
regenerate project files with updated access modifiers.
Result: iOS plugin now builds successfully
Fixed compilation errors preventing iOS plugin build:
Duplicate Method Declarations:
- Removed duplicate getContentCache() and clearContentCache() from DailyNotificationCallbacks.swift
- These methods are already implemented in DailyNotificationPlugin.swift
- Added comment explaining removal
Override Keyword Issues:
- Added 'public' access modifier to checkPermissions() override
- Added 'public' access modifier to requestPermissions() override
- Methods now properly override parent class methods from CAPPlugin
Build Configuration:
- Set GENERATE_INFOPLIST_FILE=YES for framework target
- Fixed encoding issues with LANG=en_US.UTF-8
Result:
- iOS plugin now builds successfully
- All 52 API methods compile without errors
- Ready for testing and integration
Implemented schedule calculation utility method:
calculateNextRunTime():
- Calculates next run time from cron expression or HH:mm time string
- Supports cron format: "minute hour * * *" (e.g., "30 9 * * *" = 9:30 AM daily)
- Supports time format: "HH:mm" (e.g., "09:30" = 9:30 AM daily)
- Handles same-day vs next-day scheduling
- Returns nextRunAt timestamp in milliseconds
- Fallback to 24 hours from now if parsing fails
calculateNextRunTimeFromSchedule():
- Private helper method for schedule parsing
- Parses both cron and time formats
- Uses Calendar for date calculations
- Handles timezone-aware calculations
iOS Adaptations:
- Uses Calendar.current for date calculations
- TimeInterval conversion (Date to milliseconds)
- Handles edge cases (invalid formats, past times)
Progress: 48/52 methods implemented (92% complete)
Implemented content cache access methods using Core Data:
getContentCacheById():
- Returns content cache by ID or latest if ID not provided
- Uses Core Data fetch with predicate for ID lookup
- Returns null if cache not found
- Matches Android getContentCacheById method
getLatestContentCache():
- Returns latest content cache entry
- Delegates to getContentCacheById with no ID
- Matches Android getLatestContentCache method
saveContentCache():
- Saves content to cache in Core Data
- Auto-generates ID if not provided (cache_timestamp)
- Converts payload string to Data for storage
- Stores fetchedAt, ttlSeconds, payload, and meta
- Returns saved cache object
iOS Adaptations:
- Uses Core Data ContentCache entity
- Payload stored as Data (from JSON string)
- Timestamp conversion (Date to milliseconds)
- Error handling for invalid payload data
Progress: 47/52 methods implemented (90% complete)
Implemented schedule CRUD methods using UserDefaults:
createSchedule():
- Creates new schedule with required kind field
- Auto-generates ID if not provided (kind_timestamp)
- Stores optional fields (cron, clockTime, jitterMs, backoffPolicy, stateJson)
- Adds to schedules array in UserDefaults
- Returns created schedule
updateSchedule():
- Updates existing schedule by ID
- Updates provided fields (enabled, cron, clockTime, jitterMs, backoffPolicy, stateJson, lastRunAt, nextRunAt)
- Returns updated schedule
- Rejects if schedule not found
deleteSchedule():
- Deletes schedule by ID from UserDefaults
- Removes from schedules array
- Rejects if schedule not found
enableSchedule():
- Enables or disables schedule by ID
- Updates enabled field in schedule
- Rejects if schedule not found
iOS Adaptations:
- Uses UserDefaults array instead of SQLite database
- In-memory array manipulation then persistence
- Maintains schedule structure matching Android
Progress: 44/52 methods implemented (85% complete)
Implemented database access methods using UserDefaults:
getSchedules():
- Returns schedules matching optional filters (kind, enabled)
- Filters by schedule type ('fetch' | 'notify')
- Filters by enabled status (true/false/undefined)
- Returns schedules array matching Android API
getSchedule():
- Returns single schedule by ID
- Returns null if not found
- Matches Android getSchedule method
getConfig():
- Returns configuration value by key
- Supports optional timesafariDid for scoped configs
- Returns null if config not found
- Uses UserDefaults with key prefix
setConfig():
- Stores configuration value by key
- Supports optional timesafariDid for scoped configs
- Stores as JSON string in UserDefaults
- Matches Android setConfig method
iOS Adaptations:
- Uses UserDefaults instead of SQLite database
- Config keys prefixed with 'DailyNotificationConfig_'
- DID-scoped configs use composite keys
- JSON serialization for complex values
Progress: 40/52 methods implemented (77% complete)
Implemented alarm status and testing methods matching Android functionality:
isAlarmScheduled():
- Checks if notification is scheduled for given trigger time
- Searches pending notifications for matching trigger date
- Uses 1-minute tolerance for time comparison
- Returns scheduled status and triggerAtMillis
getNextAlarmTime():
- Gets the next scheduled notification time
- Finds earliest scheduled daily notification
- Returns scheduled status and triggerAtMillis (or just scheduled: false)
testAlarm():
- Schedules test notification for testing purposes
- Defaults to 5 seconds from now (configurable)
- Creates test notification with title and body
- Returns scheduled status, secondsFromNow, and triggerAtMillis
- Useful for verifying notification delivery works
iOS Adaptations:
- Uses UNCalendarNotificationTrigger for scheduling
- Searches pending notifications to check status
- Date component matching for precise scheduling
Progress: 30/52 methods implemented (58% complete)
Implemented status and settings methods matching Android functionality:
isChannelEnabled():
- Checks if notifications are enabled (iOS doesn't have channels)
- Returns enabled status and channelId
- Uses UNUserNotificationCenter authorization status
openChannelSettings():
- Opens iOS app notification settings
- iOS doesn't have per-channel settings like Android
- Opens general app settings instead
- Returns opened status and channelId
checkStatus():
- Comprehensive status check combining permissions and scheduling
- Returns notificationsEnabled, isScheduled, scheduledCount, pendingCount
- Includes nextNotificationTime and channel information
- Combines multiple status checks into one call
iOS Adaptations:
- No notification channels (checks app-level authorization)
- Opens app settings instead of channel settings
- Uses UNUserNotificationCenter for status checks
Progress: 27/52 methods implemented (52% complete - HALFWAY!)
Implemented power and scheduling utility methods:
getPowerState():
- Returns power state code (0=unknown, 1=unplugged, 2=charging, 3=full)
- Returns isOptimizationExempt (always false on iOS)
- Uses UIDevice battery monitoring
requestBatteryOptimizationExemption():
- No-op on iOS (battery optimization not applicable)
- Exists for API compatibility with Android
- Background App Refresh is user-controlled in Settings
setAdaptiveScheduling():
- Enables/disables adaptive scheduling
- Stores setting in UserDefaults
- Matches Android behavior
iOS Adaptations:
- Battery optimization not applicable (Background App Refresh is system setting)
- Power state derived from battery state
- Adaptive scheduling stored in UserDefaults
Progress: 24/52 methods implemented (46% complete)
Implemented battery status method matching Android functionality:
getBatteryStatus():
- Gets battery level (0-100%) using UIDevice
- Detects charging state (charging or full)
- Maps battery state to power state code (0=unknown, 1=unplugged, 2=charging, 3=full)
- Returns isOptimizationExempt (always false on iOS - no battery optimization)
- Enables battery monitoring automatically
iOS Adaptations:
- Uses UIDevice.current for battery information
- Battery optimization not applicable on iOS (Background App Refresh is system setting)
- Returns -1 for battery level if unknown
Progress: 16/52 methods implemented (31% complete)
Implemented main scheduling method for iOS plugin, matching Android functionality:
Core Features:
- Permission checking and requesting (iOS notification authorization)
- Time parsing (HH:mm format) with validation
- Next run time calculation (handles same-day and next-day scheduling)
- UNUserNotificationCenter scheduling with daily repeat
- Priority/interruption level support (iOS 15.0+)
- Prefetch scheduling 5 minutes before notification (BGTaskScheduler)
- Schedule storage in UserDefaults
Implementation Details:
- Checks notification authorization status before scheduling
- Requests permission if not granted (equivalent to Android exact alarm permission)
- Parses time string and calculates next occurrence
- Creates UNCalendarNotificationTrigger for daily repeat
- Schedules BGAppRefreshTask for prefetch 5 minutes before
- Stores schedule metadata in UserDefaults for persistence
Matches Android API:
- Same parameter structure (time, title, body, sound, priority, url)
- Same behavior (daily repeat, prefetch scheduling)
- iOS-specific adaptations (UNUserNotificationCenter vs AlarmManager)
This is the first critical method implementation (10/52 methods now complete).
Created comprehensive next steps guide with priority recommendations:
Next Steps Documentation:
- Created NEXT_STEPS.md with implementation roadmap
- Prioritized critical API methods (scheduling, permissions, status)
- Provided effort estimates and decision matrix
- Recommended starting with scheduleDailyNotification() method
Current Status:
- Test apps ready (awaiting CocoaPods installation)
- 9/52 API methods implemented
- Plugin compiles successfully
- Foundation solid for further development
Recommended Path:
1. Implement critical scheduling methods (Priority 1)
2. Add permission & status methods (Priority 2)
3. Implement configuration methods (Priority 3)
4. Add content management (Priority 4)
First Target: scheduleDailyNotification() - most commonly used method
Documented CocoaPods installation process and current system status:
Installation Documentation:
- Created COCOAPODS_INSTALLATION.md with installation methods
- Documented Ruby version requirements (>= 2.7.0)
- Provided Homebrew, rbenv, and system Ruby options
- Included troubleshooting guide for common issues
Current Status Documentation:
- Created IOS_SETUP_REQUIREMENTS.md with setup status
- Documented completed command-line setup
- Identified manual step required (CocoaPods installation)
- Provided verification checklist
System Status:
- Ruby 2.6.10 (too old, needs >= 2.7.0)
- Homebrew not installed
- CocoaPods not installed
- All test app structures ready for pod install
Next Steps:
- Install Ruby >= 2.7.0 (via Homebrew recommended)
- Install CocoaPods gem
- Run pod install in both test app directories
Added iOS platform to Vue 3 test app and created standalone iOS test app:
Vue 3 Test App (daily-notification-test):
- Added iOS platform via 'npx cap add ios'
- Created ios/ directory with Xcode project structure
- Added DailyNotificationPlugin to Podfile
- Generated App.xcodeproj and App.xcworkspace
Standalone iOS Test App (ios-test-app):
- Created App structure with Capacitor configuration
- Added DailyNotificationPlugin to Podfile
- Created capacitor.config.json with plugin settings
- Copied test HTML interface (575 lines) from Android test app
- Set up public/ directory for web assets
Plugin Integration:
- Both Podfiles configured with plugin path: '../../../ios'
- Plugin dependencies ready for 'pod install'
- Configuration files created and verified
Documentation:
- Created IOS_TEST_APPS_SETUP_COMPLETE.md with setup details
- Documented next steps for CocoaPods and Xcode building
All command-line setup complete. Ready for:
- pod install (requires CocoaPods)
- Xcode building and testing
Created standalone iOS test app structure matching android-test-app:
- Added ios-test-app directory with README, setup guide, and build scripts
- Created comprehensive iOS synchronization status documentation
- Documented API method gaps between Android (52) and iOS (9 methods)
- Added iOS setup guide for Vue 3 test app
New files:
- test-apps/ios-test-app/ - Standalone iOS test app structure
- docs/IOS_SYNC_STATUS.md - Detailed API comparison and status tracking
- docs/IOS_SYNC_SUMMARY.md - Summary of iOS synchronization work
- test-apps/daily-notification-test/docs/IOS_SETUP.md - Vue app iOS setup
iOS test environments are now ready for setup. Test apps need Xcode project
generation via Capacitor CLI or copying from ios/App.
Next steps: Generate Xcode projects and implement missing API methods.
Fix three critical issues in the Android notification system:
1. configureNativeFetcher() now actually calls nativeFetcher.configure() method
- Previously only stored config in database without configuring fetcher instance
- Added synchronous configure() call with proper error handling
- Stores valid but empty config entry if configure() fails to prevent downstream errors
- Adds FETCHER|CONFIGURE_START and FETCHER|CONFIGURE_COMPLETE instrumentation logs
2. Prefetch operations now use DailyNotificationFetchWorker instead of legacy FetchWorker
- Replaced FetchWorker.scheduleDelayedFetch() with WorkManager scheduling
- Uses correct input data format (scheduled_time, fetch_time, retry_count, immediate)
- Enables native fetcher SPI to be used for prefetch operations
- Handles both delayed and immediate prefetch scenarios
3. Notification dismiss now cancels notification from NotificationManager
- Added notification cancellation before removing from storage
- Uses notificationId.hashCode() to match display notification ID
- Ensures notification disappears immediately when dismiss button is clicked
- Adds DN|DISMISS_CANCEL_NOTIF instrumentation log
Version bump: 1.0.8 → 1.0.11
Fix issue where prefetch worker saved content to ContentCache but didn't
create NotificationContentEntity, causing notification worker to skip
notifications with "content_not_found" error.
Changes:
- Extract notificationTime from input data in doWork()
- Create NotificationContentEntity with matching notification_id when
notificationTime > 0 (prefetch operations)
- Add parsePayload() helper to extract title/body from JSON or plain text
- Save entity to Room database so notification worker can find it
The notification_id format matches NotifyReceiver.kt: "notify_${notificationTime}",
ensuring the notification worker can retrieve content when the alarm fires.
Fixes issue where alarms triggered correctly but notifications were skipped
because DailyNotificationWorker couldn't find content in storage.
Fix reflection-based permission check that was failing with NoSuchMethodException.
Add multiple fallback strategies to ensure permission check works reliably.
Changes:
- Add getDeclaredMethod() fallback when getMethod() fails
- Add heuristic fallback: if exact alarms not allowed, assume they can be requested
- Improve error handling: catch NoSuchMethodException separately from other exceptions
- Add debug logging to track which reflection path is taken
- Change reflection failure log level from ERROR to WARNING (we have fallback)
The heuristic fallback is safe because:
- If exact alarms are not currently allowed, we should try to request them
- Only edge case is permanently denied (rare), worst case is unnecessary Settings redirect
- Better than failing silently or blocking permission requests
Fixes reflection failures seen in logcat where Settings.canRequestScheduleExactAlarms()
method lookup was failing, causing unnecessary Settings redirects.
Add comprehensive exact alarm permission handling for Android 12+ (API 31+)
and fix critical bugs preventing notifications from triggering.
Features:
- Add checkExactAlarmPermission() and requestExactAlarmPermission() plugin methods
- Add canScheduleExactAlarms() and canRequestExactAlarmPermission() helper methods
- Update all scheduling methods to check/request permission before scheduling
- Use reflection for canRequestScheduleExactAlarms() to avoid compilation issues
Bug Fixes:
- Fix receiver mismatch: change alarm intents from NotifyReceiver to DailyNotificationReceiver
- Fix coroutine compilation error: wrap getLatest() suspend call in runBlocking
- Store notification content in database before scheduling alarms
- Update intent action to match manifest registration
The permission request flow opens Settings intent when SCHEDULE_EXACT_ALARM
permission is not granted, providing clear user guidance. All scheduling
methods now check permission status and request it if needed before proceeding.
Version bumped to 1.0.8
- Add cancelAllNotifications() method to DailyNotificationPlugin
- Cancels all AlarmManager alarms (exact and inexact)
- Cancels all WorkManager prefetch/fetch jobs by tag
- Clears notification schedules from database (sets enabled=false)
- Idempotent - safe to call multiple times
- Implementation details:
- Reads scheduled notifications from database
- Uses NotifyReceiver.cancelNotification() for each scheduled alarm
- Includes fallback cleanup for orphaned alarms
- Cancels WorkManager jobs with tags: prefetch, daily_notification_fetch,
daily_notification_maintenance, soft_refetch, daily_notification_display,
daily_notification_dismiss
- Disables all notification and fetch schedules in database
- Add required imports:
- android.app.PendingIntent for alarm cancellation
- androidx.work.WorkManager for job cancellation
- Error handling:
- Gracefully handles missing alarms/jobs (logs warnings, doesn't fail)
- Continues cleanup even if individual operations fail
- Comprehensive logging for debugging
Fixes:
- 'not implemented' error when host app calls cancelAllNotifications()
- Enables users to update notification time without errors
- Allows users to disable notifications completely
- Prevents orphaned alarms and jobs after cancellation
The method matches TypeScript interface and is ready for use.
- Fix MainActivity ClassNotFoundException by using dynamic package launcher intent
- Replace hardcoded MainActivity class references with getLaunchIntent() helper
- Uses packageManager.getLaunchIntentForPackage() to work with any host app
- Removes dependency on specific MainActivity package/class name
- Fixes 3 occurrences in NotifyReceiver.kt (alarm clock, notification click, reminder click)
- Add exact alarm permission check before scheduling (Android 12+)
- Add canScheduleExactAlarms() helper to check SCHEDULE_EXACT_ALARM permission
- Check permission before scheduling exact alarms in scheduleExactNotification()
- Gracefully fall back to inexact alarms when permission not granted
- Prevents SecurityException and provides clear logging
- Bump version to 1.0.2
Fixes:
- ClassNotFoundException when plugin tries to resolve hardcoded MainActivity path
- SecurityException on Android 12+ when exact alarm permission not granted
- Plugin now works with any host app regardless of MainActivity package/class
All changes maintain backward compatibility and improve reliability.
The Vue test app was missing the NotifyReceiver registration in
AndroidManifest.xml, preventing alarm broadcasts from being delivered
to the BroadcastReceiver. This caused notifications scheduled via
setAlarmClock() to fire but not display.
Added NotifyReceiver registration matching the working android-test-app
configuration. Also includes supporting improvements:
- Enhanced alarm scheduling with setAlarmClock() for Doze exemption
- Unique request codes based on trigger time to prevent PendingIntent conflicts
- Diagnostic methods (isAlarmScheduled, getNextAlarmTime, testAlarm)
- TypeScript definitions for new methods
Verified: Notification successfully fired at 09:41:00 and was displayed.
- Add handleOnResume() fallback to resolve permission requests when
Capacitor Bridge doesn't route results (requestCode 1001)
- Implement checkPermissions() with override modifier for Capacitor
standard PermissionStatus format
- Implement getExactAlarmStatus() to return exact alarm capability info
- Implement updateStarredPlans() to store plan IDs in SharedPreferences
- Fix requestPermissions() override to properly delegate to
requestNotificationPermissions()
- Fix handleRequestPermissionsResult() return type to Unit
These changes ensure permission requests resolve correctly even when
Capacitor's Bridge doesn't recognize our custom request code, and
implement all missing methods called by the test application.
- Fix cron parsing to correctly calculate next run time based on hour/minute
- Always schedule prefetch 5 minutes before notification (even without URL)
- Make notifications dismissable with setAutoCancel(true)
- Add click action to launch app when notification is tapped
- Conditionally require network only when URL is provided for prefetch
- Generate mock content when no URL is specified
These changes ensure notifications fire at the correct time, are
user-friendly (dismissable and clickable), and prefetch works reliably
even without a content URL.
Restructure Android project from nested module layout to standard
Capacitor plugin structure following community conventions.
Structure Changes:
- Move plugin code from android/plugin/ to android/src/main/java/
- Move test app from android/app/ to test-apps/android-test-app/app/
- Remove nested android/plugin module structure
- Remove nested android/app test app structure
Build Infrastructure:
- Add Gradle wrapper files (gradlew, gradlew.bat, gradle/wrapper/)
- Transform android/build.gradle from root project to library module
- Update android/settings.gradle for standalone plugin builds
- Add android/gradle.properties with AndroidX configuration
- Add android/consumer-rules.pro for ProGuard rules
Configuration Updates:
- Add prepare script to package.json for automatic builds on npm install
- Update package.json version to 1.0.1
- Update android/build.gradle to properly resolve Capacitor dependencies
- Update test-apps/android-test-app/settings.gradle with correct paths
- Remove android/variables.gradle (hardcode values in build.gradle)
Documentation:
- Update BUILDING.md with new structure and build process
- Update INTEGRATION_GUIDE.md to reflect standard structure
- Update README.md to remove path fix warnings
- Add test-apps/BUILD_PROCESS.md documenting test app build flows
Test App Configuration:
- Fix android-test-app to correctly reference plugin and Capacitor
- Remove capacitor-cordova-android-plugins dependency (not needed)
- Update capacitor.settings.gradle path verification in fix script
BREAKING CHANGE: Plugin now uses standard Capacitor Android structure.
Consuming apps must update their capacitor.settings.gradle to reference
android/ instead of android/plugin/. This is automatically handled by
Capacitor CLI for apps using standard plugin installation.
Fixed critical compilation errors preventing iOS plugin build:
- Updated logger API calls from logger.debug(TAG, msg) to logger.log(.debug, msg)
across all iOS plugin files to match DailyNotificationLogger interface
- Fixed async/await concurrency in makeConditionalRequest using semaphore pattern
- Fixed NotificationContent immutability by creating new instances instead of mutation
- Changed private access control to internal for extension-accessible methods
- Added iOS 15.0+ availability checks for interruptionLevel property
- Fixed static member references using Self.MEMBER_NAME syntax
- Added missing .scheduling case to exhaustive switch statement
- Fixed variable initialization in retry state closures
Added DailyNotificationStorage.swift implementation matching Android pattern.
Updated build scripts with improved error reporting and full log visibility.
iOS plugin now compiles successfully. All build errors resolved.
Add comprehensive iOS build and deployment infrastructure with command-line
tooling, documentation, and web assets synchronization.
Changes:
- Update Capacitor dependencies to v6.0 in podspec
- Add iOS build support to build-native.sh with NVM integration
- Sync iOS web assets to match www/ source directory
- Create deployment scripts for both native iOS app and Vue 3 test app
- Add comprehensive iOS simulator deployment documentation
- Document web assets parity requirements between Android and iOS
This enables:
- Command-line iOS builds without Xcode UI
- Automated deployment to iOS simulators
- Consistent web assets across platforms
- Clear separation between native iOS app (ios/App) and Vue 3 test app
Files modified:
- ios/DailyNotificationPlugin.podspec (Capacitor 6.0)
- ios/App/App/public/index.html (synced from www/)
- scripts/build-native.sh (iOS build support)
Files added:
- docs/WEB_ASSETS_PARITY.md
- docs/standalone-ios-simulator-guide.md
- scripts/build-and-deploy-native-ios.sh
- test-apps/daily-notification-test/docs/IOS_BUILD_QUICK_REFERENCE.md
- test-apps/daily-notification-test/scripts/build-and-deploy-ios.sh
The /api/v2/report/plansLastUpdatedBetween endpoint requires the afterId
parameter. When no previous jwtId is stored, default to "0" for the first
request. This ensures afterId is always present and never null/omitted.
Fix resolves "afterId parameter is required" API errors. Verified working:
prefetch execution shows request body includes afterId: "0" and API returns
HTTP 200 successfully.
Remove the aud (audience) claim from JWT payloads. The server's did-jwt
verification requires an audience option when aud is present, but the server
isn't configured to validate it, causing "JWT audience is required but your
app address has not been configured" errors.
Changes:
- Removed aud claim from JWT payload in generateEndorserJWT()
- Updated key derivation to User Zero's specific path (m/84737769'/0'/0'/0')
- Added public key verification against expected User Zero key
- Enhanced JWT diagnostics logging throughout
- Added alarm deduplication optimization (prevent duplicate alarms for same time)
Verified: JWT validation now passes (token length 360→333 chars, no audience
error). New error is API parameter validation (afterId required - separate issue).
Move native fetcher configuration from App.vue mounted() to HomeView.vue
onMounted() because App.vue's mounted hook was not executing reliably,
likely due to Vue router lifecycle timing.
Changes:
- App.vue: Remove non-executing configuration code, add note explaining move
- HomeView.vue: Add configureNativeFetcher() function with full configuration
flow including ES256K JWT generation, API URL setup, and starred plans update
- Add nativeFetcherConfigured ref to prevent duplicate configuration attempts
- Wrap starred plans update in try-catch (non-blocking if it fails)
This fixes the issue where TestNativeFetcher was not being configured,
causing all prefetch operations to fail with "Not configured" error and
fall back to emergency content.
Verified: Configuration now executes successfully on HomeView mount,
TestNativeFetcher shows "Configured with API" in logcat.
Add detailed logging when cancelling existing alarms to aid in
debugging notification scheduling issues. Logs now indicate whether
an existing alarm was found and cancelled, or if no alarm existed.
This improves observability when investigating duplicate notifications
or scheduling conflicts.
Implement unique work names to prevent duplicate WorkManager tasks
from being enqueued when multiple notifications are scheduled for
the same time or when the receiver is triggered multiple times.
Changes:
- DailyNotificationReceiver: Use enqueueUniqueWork with unique names
("display_{id}", "dismiss_{id}") and ExistingWorkPolicy.KEEP/REPLACE
- DailyNotificationFetcher: Use unique work names based on scheduled
time rounded to minutes ("fetch_{minutes}") with ExistingWorkPolicy.REPLACE
This resolves the issue where ~25+ concurrent workers were being
enqueued for the same notification, leading to race conditions and
resource waste. Now only one worker processes each notification/fetch
at a time.
Verified in logcat: Worker count reduced from 25+ to 1 per notification.
- Update JWT section to reflect current status:
- JWT Generation: ✅ COMPLETE (TypeScript generates ES256K correctly)
- JWT Verification: 🟡 PARTIAL (generation works, server verification fails)
- Document verification issue:
- Error: 'no matching public key found'
- Root cause: Server cannot resolve DID to get public key
- JWT signature is cryptographically valid
- Issue is DID resolution, not JWT generation
- Add verification status table:
- Component-level status breakdown
- Clear distinction between generation (✅) and verification (❌)
- Add next steps checklist:
- Verify DID registration on resolver
- Test with known DID
- Check server resolver config
- Verify test API server supports DID-based JWT verification
- Update implementation status:
- Mark TypeScript JWT generation as complete
- Mark DID resolution as pending verification
- Remove outdated HMAC-SHA256 references