diff --git a/.changes/with-webview-wry-feature.md b/.changes/with-webview-wry-feature.md new file mode 100644 index 000000000000..1e8cb4fc7b14 --- /dev/null +++ b/.changes/with-webview-wry-feature.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:bug +--- + +Move `PluginApi::register_ios_plugin` behind the `wry` Cargo feature as `Webview::with_webview` is only available when that feature is enabled. diff --git a/core/tauri/src/manager/webview.rs b/core/tauri/src/manager/webview.rs index c7b2e100c4ef..d1001bbf36eb 100644 --- a/core/tauri/src/manager/webview.rs +++ b/core/tauri/src/manager/webview.rs @@ -631,7 +631,7 @@ impl WebviewManager { .webview_created(webview_); }); - #[cfg(target_os = "ios")] + #[cfg(all(target_os = "ios", feature = "wry"))] { webview .with_webview(|w| { diff --git a/core/tauri/src/plugin/mobile.rs b/core/tauri/src/plugin/mobile.rs index e5ecd49514a4..5a543934ba72 100644 --- a/core/tauri/src/plugin/mobile.rs +++ b/core/tauri/src/plugin/mobile.rs @@ -152,7 +152,7 @@ impl fmt::Display for ErrorResponse { impl PluginApi { /// Registers an iOS plugin. - #[cfg(target_os = "ios")] + #[cfg(all(target_os = "ios", feature = "wry"))] pub fn register_ios_plugin( &self, init_fn: unsafe fn() -> *const std::ffi::c_void,