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:
@@ -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)")
|
||||
|
||||
Reference in New Issue
Block a user