-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Calling the Capacitor InAppBrowser plugin’s openInWebView method on iOS fails with an invalid input parameters error, even when passing the minimal required arguments.
Steps to Reproduce
// Case 1: minimal call
Capacitor.Plugins.InAppBrowser.openInWebView({
url: "https://google.com"
})
// Case 2: with empty options
Capacitor.Plugins.InAppBrowser.openInWebView({
url: "https://google.com",
options: {}
})
Expected Behavior
The call should open the URL inside a web view using default options, without requiring additional parameters.
Actual Behavior
Both calls fail with: The 'openInWebView' input parameters aren't valid.
Environment
- Platform: iOS
- Plugin: Capacitor InAppBrowser
- Method: openInWebView
Notes
- The error originates from the guard in the iOS implementation:
guard let options: OSInAppBrowserWebViewModel =
self.createModel(for: call.getObject("options")) else {
return self.error(call, type: .inputArgumentsIssue(target: .webView))
}
createModel(for:) returns nil for an empty object, so the call is always rejected unless a very specific options payload is provided.
Expected fix:
Either:
- allow {} as valid input and fall back to default values, or
- document which fields in options are required.
Metadata
Metadata
Assignees
Labels
No labels