fix(core): iOS compilation without the wry feature (#10176)

Ref https://github.com/tauri-apps/plugins-workspace/pull/1402
This commit is contained in:
Lucas Fernandes Nogueira
2024-07-02 23:40:01 -03:00
committed by GitHub
parent 7bc6a2a1d6
commit 55733aba9c
3 changed files with 7 additions and 2 deletions

View File

@@ -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.

View File

@@ -631,7 +631,7 @@ impl<R: Runtime> WebviewManager<R> {
.webview_created(webview_);
});
#[cfg(target_os = "ios")]
#[cfg(all(target_os = "ios", feature = "wry"))]
{
webview
.with_webview(|w| {

View File

@@ -152,7 +152,7 @@ impl<T> fmt::Display for ErrorResponse<T> {
impl<R: Runtime, C: DeserializeOwned> PluginApi<R, C> {
/// 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,