diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index eb5885e..0fcdf68 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -270,7 +270,7 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
dependencies = [
- "objc2",
+ "objc2 0.6.4",
]
[[package]]
@@ -762,7 +762,7 @@ dependencies = [
"bitflags 2.13.1",
"block2",
"libc",
- "objc2",
+ "objc2 0.6.4",
]
[[package]]
@@ -2079,7 +2079,7 @@ dependencies = [
"dpi",
"gtk",
"keyboard-types",
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"objc2-core-foundation",
"objc2-foundation",
@@ -2157,6 +2157,22 @@ dependencies = [
"syn 2.0.119",
]
+[[package]]
+name = "objc-sys"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
+
+[[package]]
+name = "objc2"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
+dependencies = [
+ "objc-sys",
+ "objc2-encode",
+]
+
[[package]]
name = "objc2"
version = "0.6.4"
@@ -2175,7 +2191,7 @@ checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c"
dependencies = [
"bitflags 2.13.1",
"block2",
- "objc2",
+ "objc2 0.6.4",
"objc2-core-foundation",
"objc2-foundation",
]
@@ -2187,7 +2203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c"
dependencies = [
"bitflags 2.13.1",
- "objc2",
+ "objc2 0.6.4",
"objc2-foundation",
]
@@ -2197,7 +2213,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa"
dependencies = [
- "objc2",
+ "objc2 0.6.4",
"objc2-foundation",
]
@@ -2209,7 +2225,7 @@ checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
dependencies = [
"bitflags 2.13.1",
"dispatch2",
- "objc2",
+ "objc2 0.6.4",
]
[[package]]
@@ -2220,7 +2236,7 @@ checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807"
dependencies = [
"bitflags 2.13.1",
"dispatch2",
- "objc2",
+ "objc2 0.6.4",
"objc2-core-foundation",
"objc2-io-surface",
]
@@ -2231,7 +2247,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006"
dependencies = [
- "objc2",
+ "objc2 0.6.4",
"objc2-foundation",
]
@@ -2241,7 +2257,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009"
dependencies = [
- "objc2",
+ "objc2 0.6.4",
"objc2-foundation",
]
@@ -2252,7 +2268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d"
dependencies = [
"bitflags 2.13.1",
- "objc2",
+ "objc2 0.6.4",
"objc2-core-foundation",
"objc2-core-graphics",
]
@@ -2280,7 +2296,7 @@ checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
dependencies = [
"bitflags 2.13.1",
"block2",
- "objc2",
+ "objc2 0.6.4",
"objc2-core-foundation",
]
@@ -2291,7 +2307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d"
dependencies = [
"bitflags 2.13.1",
- "objc2",
+ "objc2 0.6.4",
"objc2-core-foundation",
]
@@ -2302,7 +2318,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f"
dependencies = [
"bitflags 2.13.1",
- "objc2",
+ "objc2 0.6.4",
"objc2-core-foundation",
"objc2-foundation",
]
@@ -2315,7 +2331,7 @@ checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22"
dependencies = [
"bitflags 2.13.1",
"block2",
- "objc2",
+ "objc2 0.6.4",
"objc2-cloud-kit",
"objc2-core-data",
"objc2-core-foundation",
@@ -2334,7 +2350,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e"
dependencies = [
- "objc2",
+ "objc2 0.6.4",
"objc2-foundation",
]
@@ -2346,7 +2362,7 @@ checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f"
dependencies = [
"bitflags 2.13.1",
"block2",
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"objc2-core-foundation",
"objc2-foundation",
@@ -3211,7 +3227,7 @@ dependencies = [
"bytemuck",
"js-sys",
"ndk",
- "objc2",
+ "objc2 0.6.4",
"objc2-core-foundation",
"objc2-core-graphics",
"objc2-foundation",
@@ -3385,7 +3401,7 @@ dependencies = [
"log",
"ndk",
"ndk-sys",
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"objc2-foundation",
"objc2-ui-kit",
@@ -3441,7 +3457,7 @@ dependencies = [
"log",
"mime",
"muda",
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"objc2-foundation",
"objc2-ui-kit",
@@ -3612,7 +3628,7 @@ dependencies = [
"gtk",
"http",
"jni",
- "objc2",
+ "objc2 0.6.4",
"objc2-ui-kit",
"objc2-web-kit",
"raw-window-handle",
@@ -3636,7 +3652,7 @@ dependencies = [
"http",
"jni",
"log",
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"once_cell",
"percent-encoding",
@@ -4051,7 +4067,7 @@ dependencies = [
"dirs",
"libappindicator",
"muda",
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"objc2-core-foundation",
"objc2-core-graphics",
@@ -4225,6 +4241,7 @@ name = "vyla-home"
version = "1.1.28"
dependencies = [
"base64 0.22.1",
+ "objc2 0.5.2",
"serde",
"serde_json",
"tauri",
@@ -4475,7 +4492,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c"
dependencies = [
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"objc2-core-foundation",
"objc2-foundation",
@@ -4930,7 +4947,7 @@ dependencies = [
"jni",
"libc",
"ndk",
- "objc2",
+ "objc2 0.6.4",
"objc2-app-kit",
"objc2-core-foundation",
"objc2-foundation",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index d2e0537..12ea646 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -16,6 +16,9 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
base64 = "0.22"
+[target.'cfg(target_os = "macos")'.dependencies]
+objc2 = "0.5"
+
[profile.release]
opt-level = 3
lto = true
diff --git a/src-tauri/Info.plist b/src-tauri/Info.plist
index 66143f2..594d619 100644
--- a/src-tauri/Info.plist
+++ b/src-tauri/Info.plist
@@ -6,16 +6,8 @@
NSAllowsLocalNetworking
- NSExceptionDomains
-
- localhost
-
- NSExceptionAllowsInsecureHTTPLoads
-
- NSIncludesSubdomains
-
-
-
+ NSAllowsArbitraryLoads
+
\ No newline at end of file
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 55ddb5b..98ee82d 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -658,6 +658,17 @@ fn main() {
.initialization_script(LINK_HANDLER_SCRIPT)
.build()?;
+ #[cfg(target_os = "macos")]
+ {
+ use objc2::msg_send;
+ use objc2::runtime::AnyObject;
+ let _ = window.with_webview(|webview| unsafe {
+ let wk_webview = webview.inner() as *mut AnyObject;
+ let config: *mut AnyObject = msg_send![wk_webview, configuration];
+ let _: () = msg_send![config, setUpgradeKnownHostsToHTTPS: false];
+ });
+ }
+
let (main_js, root_dir) = resolve_script_and_root(app);
debug_log("Searching for node binary...");
let node_bin = match find_node_binary(app) {
@@ -858,9 +869,15 @@ fn main() {
window_label
));
}
- } else {
- let _ = w.emit(&msg.event, msg.data.clone());
- }
+ } else if msg.event == "ready" {
+ if let Some(url_str) = msg.data.get("url").and_then(|u| u.as_str()) {
+ if let Ok(url_parsed) = url_str.parse::() {
+ let _ = w.navigate(url_parsed);
+ }
+ }
+} else {
+ let _ = w.emit(&msg.event, msg.data.clone());
+}
}
}
});
diff --git a/ui/index.html b/ui/index.html
index 44c7f90..8471d23 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -587,7 +587,6 @@ void main() {
const data = e.payload || e;
if (data && data.url) {
setStatus("Launching...");
- window.location.replace(data.url);
}
});