Files
daily-notification-plugin/test-apps/ios-test-app
Matthew 95bf0f03c9 feat(ios): update test app for iOS-specific methods and update checklist
Update iOS test app to use iOS-specific methods and remove Android-specific
code for better platform parity:

iOS Test App Updates:
- Remove Android-specific UI elements:
  - Removed "Exact Alarms" status (Android-only feature)
  - Removed "Channel" status (Android notification channels)
- Add iOS-specific UI elements:
  - Added "Background Refresh" status (BGTaskScheduler registration)
  - Added "Pending" notifications count display
- Replace Android-specific methods:
  - Removed isChannelEnabled() calls
  - Added getBackgroundTaskStatus() for background task registration
  - Added getPendingNotifications() for pending notification count
  - Updated loadPermissionStatus() to use getNotificationPermissionStatus()
- Update error handling:
  - Removed EXACT_ALARM_PERMISSION_REQUIRED error code references
  - Added iOS-specific error handling for NOTIFICATION_PERMISSION_DENIED
- Update checkStatus() handling:
  - Removed Android-specific fields (channelEnabled, exactAlarmsGranted)
  - Added iOS-specific status information (pending notifications)
- Add iOS-specific action buttons:
  - "Open Settings" button (openNotificationSettings)
  - "Background Refresh" button (openBackgroundAppRefreshSettings)
- Add iOS-specific helper functions:
  - loadBackgroundRefreshStatus() - checks BGTaskScheduler registration
  - loadPendingNotificationsStatus() - displays pending notification count
  - openNotificationSettings() - opens iOS notification settings
  - openBackgroundRefreshSettings() - opens Background App Refresh settings

iOS Implementation Checklist Updates:
- Mark integration tests as complete (DailyNotificationRecoveryIntegrationTests)
- Mark data conversion helpers as complete (DailyNotificationDataConversions.swift)
- Mark termination detection tests as complete
- Mark boot detection tests as complete
- Mark partial failure scenario tests as complete
- Update document version to 1.1.0
- Update last updated date to 2025-12-24

Achieves iOS-Android parity by using platform-appropriate methods and APIs.
2025-12-25 00:53:22 -08:00
..

iOS Test App

Status: SETUP COMPLETE
Ready for: Building and testing


Setup Status

Basic structure created
Capacitor iOS platform added
Info.plist configured with BGTask identifiers
AppDelegate configured for background tasks
Podfile configured with plugin reference
⚠️ CocoaPods installation required


Next Steps

1. Install CocoaPods (if not installed)

sudo gem install cocoapods

2. Install Pod Dependencies

cd ios/App
pod install
cd ../..

3. Build and Run

Option A: Using Build Script

# From repo root
./scripts/build-ios-test-app.sh --simulator

Option B: Using Xcode

cd ios/App
open App.xcworkspace
# Then press Cmd+R in Xcode

Plugin Registration

The plugin is registered via:

  • Podfile: pod 'DailyNotificationPlugin', :path => '../../../ios/Plugin'
  • Capacitor Config: capacitor.config.json includes plugin entry
  • AppDelegate: Background tasks registered

Configuration Files

  • Info.plist: Configured with BGTask identifiers and background modes
  • AppDelegate.swift: Background task registration added
  • Podfile: Plugin reference added
  • capacitor.config.json: Plugin enabled

Troubleshooting

CocoaPods Not Installed

Error: command not found: pod

Solution:

sudo gem install cocoapods

Plugin Not Found

Error: Build fails with plugin not found

Solution:

  1. Verify plugin exists at ../../../ios/Plugin/
  2. Run pod install in ios/App/ directory
  3. Clean build folder in Xcode (Cmd+Shift+K)

Build Failures

Solution:

  1. Run pod install in ios/App/ directory
  2. Clean build folder (Cmd+Shift+K)
  3. Verify Capacitor plugin path

File Structure

ios-test-app/
├── ios/
│   └── App/
│       ├── App.xcworkspace      # Open this in Xcode
│       ├── Podfile               # CocoaPods dependencies
│       └── App/
│           ├── AppDelegate.swift # Background task registration
│           ├── Info.plist        # BGTask identifiers configured
│           └── public/
│               └── index.html    # Test UI
├── App/
│   └── App/
│       └── Public/
│           └── index.html        # Source HTML
└── capacitor.config.json         # Capacitor configuration

References

  • Requirements: doc/test-app-ios/IOS_TEST_APP_REQUIREMENTS.md
  • Testing Guide: doc/IOS_PHASE1_TESTING_GUIDE.md
  • Build Script: scripts/build-ios-test-app.sh

Status: READY FOR BUILDING (after CocoaPods installation)