fix(ios): remove unused variable warning in AppDelegate

Replace if let binding with boolean is check for CAPBridgedPlugin
conformance test. This eliminates the compiler warning about unused
variable 'capacitorPluginType' while maintaining the same diagnostic
functionality.
This commit is contained in:
Matthew
2025-11-19 22:03:25 -08:00
parent 92bb566631
commit e6cd8eb055

View File

@@ -92,7 +92,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
// Test if class can be cast to CapacitorPlugin.Type
if let pluginType = aClass as? CAPPlugin.Type {
// Try casting to CapacitorPlugin (which is CAPPlugin & CAPBridgedPlugin)
if let capacitorPluginType = pluginType as? (CAPPlugin & CAPBridgedPlugin).Type {
if pluginType is (CAPPlugin & CAPBridgedPlugin).Type {
NSLog("DNP-DEBUG: ✅ Can cast to (CAPPlugin & CAPBridgedPlugin).Type")
} else {
NSLog("DNP-DEBUG: ❌ Cannot cast to (CAPPlugin & CAPBridgedPlugin).Type")