Skip to content

Commit

Permalink
fix(core): iOS compilation without the wry feature (#10176)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Jul 3, 2024
1 parent 7bc6a2a commit 55733ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/with-webview-wry-feature.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion core/tauri/src/manager/webview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/plugin/mobile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 55733ab

Please sign in to comment.