Skip to content

Commit

Permalink
fix: mac build break due to objc crate not added for webview zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Dec 27, 2023
1 parent b0d206f commit a596666
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-works
[target.'cfg(target_os = "linux")'.dependencies]
webkit2gtk = "0.18" # if tauri build fails, make sure to match this version to what we have in tauri

[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2"

[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
Expand Down
4 changes: 4 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ use std::process::Command;
#[cfg(target_os = "linux")]
extern crate webkit2gtk;

#[cfg(target_os = "macos")]
#[macro_use]
extern crate objc;

use regex::Regex;
extern crate percent_encoding;
use tauri::http::ResponseBuilder;
Expand Down

0 comments on commit a596666

Please sign in to comment.