diff --git a/ios/App/App/AppBridgeViewController.swift b/ios/App/App/AppBridgeViewController.swift index 006471bf..e1d4c255 100644 --- a/ios/App/App/AppBridgeViewController.swift +++ b/ios/App/App/AppBridgeViewController.swift @@ -4,10 +4,9 @@ // // Capacitor bridge view controller subclass. // -// Phase 2B-1: registers the app-local SharedImagePlugin from the deterministic -// capacitorDidLoad() lifecycle callback, where the Capacitor bridge is -// guaranteed to exist. The existing AppDelegate registration is intentionally -// left in place as a temporary safety net during this phase. +// Registers the app-local SharedImagePlugin once the Capacitor bridge +// has been created. This provides deterministic plugin registration +// before the web layer starts executing. // import UIKit @@ -18,11 +17,6 @@ class AppBridgeViewController: CAPBridgeViewController { override func capacitorDidLoad() { super.capacitorDidLoad() - // Register the app-local SharedImage plugin using the same approach as - // AppDelegate. The @objc(SharedImage) annotation exposes it as - // "SharedImage" to JavaScript. At this point the bridge is guaranteed - // to be available (capacitorDidLoad runs immediately after the bridge - // is created). let pluginInstance = SharedImagePlugin() bridge?.registerPluginInstance(pluginInstance) print("[AppBridgeViewController] ✅ Registered SharedImagePlugin (exposed as 'SharedImage' via @objc annotation)")