docs(ios): clean up AppBridgeViewController registration comments

Replace the transitional Phase 2B-1 comments (which referenced a temporary
AppDelegate registration safety net) with a concise description of the
plugin registration now that it is finalized. Comment-only change; plugin
registration behavior is unchanged.
This commit is contained in:
Jose Olarte III
2026-06-30 10:30:30 +08:00
parent c6d5876da3
commit 125406a54c

View File

@@ -4,10 +4,9 @@
// //
// Capacitor bridge view controller subclass. // Capacitor bridge view controller subclass.
// //
// Phase 2B-1: registers the app-local SharedImagePlugin from the deterministic // Registers the app-local SharedImagePlugin once the Capacitor bridge
// capacitorDidLoad() lifecycle callback, where the Capacitor bridge is // has been created. This provides deterministic plugin registration
// guaranteed to exist. The existing AppDelegate registration is intentionally // before the web layer starts executing.
// left in place as a temporary safety net during this phase.
// //
import UIKit import UIKit
@@ -18,11 +17,6 @@ class AppBridgeViewController: CAPBridgeViewController {
override func capacitorDidLoad() { override func capacitorDidLoad() {
super.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() let pluginInstance = SharedImagePlugin()
bridge?.registerPluginInstance(pluginInstance) bridge?.registerPluginInstance(pluginInstance)
print("[AppBridgeViewController] ✅ Registered SharedImagePlugin (exposed as 'SharedImage' via @objc annotation)") print("[AppBridgeViewController] ✅ Registered SharedImagePlugin (exposed as 'SharedImage' via @objc annotation)")