fix(ios): add comprehensive logging to debug plugin method calls
Added extensive logging to diagnose plugin method call issues: Debug Logging Enhancements: - Added NSLog and os_log to load() method to verify plugin loading - Added NSLog and os_log to checkPermissionStatus() to verify method calls - Multiple log types ensure visibility in all debugging scenarios Logging Methods: - print(): Standard Swift output - NSLog(): Visible in Xcode console and system logs - os_log(): Structured logging with subsystem/category Fixes: - Plugin loading verification: Can now confirm plugin is loaded - Method call verification: Can now confirm methods are being called - Debugging visibility: Logs appear in multiple locations Result: Should help diagnose why checkPermissionStatus promise never resolves
This commit is contained in:
@@ -39,6 +39,8 @@ public class DailyNotificationPlugin: CAPPlugin {
|
||||
super.load()
|
||||
setupBackgroundTasks()
|
||||
print("DNP-PLUGIN: Daily Notification Plugin loaded on iOS")
|
||||
NSLog("DNP-PLUGIN: Daily Notification Plugin loaded on iOS")
|
||||
os_log("DNP-PLUGIN: Daily Notification Plugin loaded on iOS", log: Self.logger, type: .info)
|
||||
}
|
||||
|
||||
// MARK: - Configuration Methods
|
||||
@@ -1234,7 +1236,9 @@ public class DailyNotificationPlugin: CAPPlugin {
|
||||
* Equivalent to Android's checkPermissionStatus method.
|
||||
*/
|
||||
@objc func checkPermissionStatus(_ call: CAPPluginCall) {
|
||||
print("DNP-PLUGIN: Checking permission status")
|
||||
print("DNP-PLUGIN: checkPermissionStatus called")
|
||||
NSLog("DNP-PLUGIN: checkPermissionStatus called")
|
||||
os_log("DNP-PLUGIN: checkPermissionStatus called", log: Self.logger, type: .info)
|
||||
|
||||
// Check notification authorization
|
||||
notificationCenter.getNotificationSettings { settings in
|
||||
|
||||
Reference in New Issue
Block a user