From 3ca70c31bf050287d82626b635e95ab4c1dc0689 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Fri, 6 Feb 2026 17:45:57 +0100 Subject: [PATCH] fix(ios): register WebDavHttpPlugin with Capacitor bridge The plugin was compiled but never registered on iOS, causing "WebDavHttp plugin not implemented" errors. Add a custom CAPBridgeViewController subclass that registers the plugin, mirroring the Android registration in CapacitorMainActivity. --- ios/App/App.xcodeproj/project.pbxproj | 4 ++++ ios/App/App/Base.lproj/Main.storyboard | 2 +- ios/App/App/CustomViewController.swift | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 ios/App/App/CustomViewController.swift diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 6e8ee8d5ba..a1da764fad 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; }; B63E17A12C5F3D8A00A1B2C3 /* WebDavHttpPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63E17A02C5F3D8A00A1B2C3 /* WebDavHttpPlugin.swift */; }; B63E17A32C5F3D8A00A1B2C3 /* WebDavHttpPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = B63E17A22C5F3D8A00A1B2C3 /* WebDavHttpPlugin.m */; }; + B63E17A52C5F3D8A00A1B2C3 /* CustomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63E17A42C5F3D8A00A1B2C3 /* CustomViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -33,6 +34,7 @@ AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; }; B63E17A02C5F3D8A00A1B2C3 /* WebDavHttpPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebDavHttpPlugin.swift; sourceTree = ""; }; B63E17A22C5F3D8A00A1B2C3 /* WebDavHttpPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WebDavHttpPlugin.m; sourceTree = ""; }; + B63E17A42C5F3D8A00A1B2C3 /* CustomViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomViewController.swift; sourceTree = ""; }; FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -79,6 +81,7 @@ children = ( 50379B222058CBB4000EE86E /* capacitor.config.json */, 504EC3071FED79650016851F /* AppDelegate.swift */, + B63E17A42C5F3D8A00A1B2C3 /* CustomViewController.swift */, B63E17A02C5F3D8A00A1B2C3 /* WebDavHttpPlugin.swift */, B63E17A22C5F3D8A00A1B2C3 /* WebDavHttpPlugin.m */, 504EC30B1FED79650016851F /* Main.storyboard */, @@ -216,6 +219,7 @@ buildActionMask = 2147483647; files = ( 504EC3081FED79650016851F /* AppDelegate.swift in Sources */, + B63E17A52C5F3D8A00A1B2C3 /* CustomViewController.swift in Sources */, B63E17A12C5F3D8A00A1B2C3 /* WebDavHttpPlugin.swift in Sources */, B63E17A32C5F3D8A00A1B2C3 /* WebDavHttpPlugin.m in Sources */, ); diff --git a/ios/App/App/Base.lproj/Main.storyboard b/ios/App/App/Base.lproj/Main.storyboard index b44df7be8f..1fa013f1f0 100644 --- a/ios/App/App/Base.lproj/Main.storyboard +++ b/ios/App/App/Base.lproj/Main.storyboard @@ -11,7 +11,7 @@ - + diff --git a/ios/App/App/CustomViewController.swift b/ios/App/App/CustomViewController.swift new file mode 100644 index 0000000000..5721fd3782 --- /dev/null +++ b/ios/App/App/CustomViewController.swift @@ -0,0 +1,8 @@ +import UIKit +import Capacitor + +class CustomViewController: CAPBridgeViewController { + override open func capacitorDidLoad() { + bridge?.registerPluginInstance(WebDavHttpPlugin()) + } +}