Capacitor iOS was not discovering DailyNotificationPlugin because it did not conform to the CAPBridgedPlugin protocol required for runtime discovery. Changes: - Add @objc extension to DailyNotificationPlugin implementing CAPBridgedPlugin with identifier, jsName, and pluginMethods properties - Force-load plugin framework in AppDelegate before Capacitor initializes - Remove duplicate BGTaskScheduler registration from AppDelegate (plugin handles it) - Update podspec to use dynamic framework (static_framework = false) - Add diagnostic logging to verify plugin discovery Result: Plugin is now discovered by Capacitor and all methods are accessible from JavaScript. Verified working with checkPermissionStatus() method. Files modified: - ios/Plugin/DailyNotificationPlugin.swift: Added CAPBridgedPlugin extension - test-apps/ios-test-app/ios/App/App/AppDelegate.swift: Force-load + diagnostics - ios/DailyNotificationPlugin.podspec: Dynamic framework setting - doc/directives/0003-iOS-Android-Parity-Directive.md: Documented solution
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.jsonincludes 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:
- Verify plugin exists at
../../../ios/Plugin/ - Run
pod installinios/App/directory - Clean build folder in Xcode (Cmd+Shift+K)
Build Failures
Solution:
- Run
pod installinios/App/directory - Clean build folder (Cmd+Shift+K)
- 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)