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
20 lines
908 B
Ruby
20 lines
908 B
Ruby
Pod::Spec.new do |s|
|
|
s.name = 'DailyNotificationPlugin'
|
|
s.version = '1.0.0'
|
|
s.summary = 'Daily Notification Plugin for Capacitor'
|
|
s.license = 'MIT'
|
|
s.homepage = 'https://github.com/timesafari/daily-notification-plugin'
|
|
s.author = 'Matthew Raymer'
|
|
s.source = { :git => 'https://github.com/timesafari/daily-notification-plugin.git', :tag => s.version.to_s }
|
|
s.source_files = 'Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
s.ios.deployment_target = '13.0'
|
|
s.dependency 'Capacitor', '>= 5.0.0'
|
|
s.dependency 'CapacitorCordova', '>= 5.0.0'
|
|
s.swift_version = '5.1'
|
|
s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1' }
|
|
s.deprecated = false
|
|
# Set to false so Capacitor can discover the plugin
|
|
# Capacitor iOS does not scan static frameworks for plugin discovery
|
|
# Dynamic frameworks are discoverable via Objective-C runtime scanning
|
|
s.static_framework = false
|
|
end |