diff --git a/.changes/fix-core-ios-async-panic.md b/.changes/fix-core-ios-async-panic.md new file mode 100644 index 000000000..6732e206f --- /dev/null +++ b/.changes/fix-core-ios-async-panic.md @@ -0,0 +1,5 @@ +--- +tauri: "patch:bug" +--- + +Fixed an issue that caused iOS apps to panic with an async `run()` entrypoint. diff --git a/crates/tauri/src/protocol/tauri.rs b/crates/tauri/src/protocol/tauri.rs index c9753c69e..510cc0a8c 100644 --- a/crates/tauri/src/protocol/tauri.rs +++ b/crates/tauri/src/protocol/tauri.rs @@ -122,7 +122,7 @@ fn get_response( for (name, value) in request.headers() { proxy_builder = proxy_builder.header(name, value); } - match crate::async_runtime::block_on(proxy_builder.send()) { + match crate::async_runtime::safe_block_on(proxy_builder.send()) { Ok(r) => { let mut response_cache_ = response_cache.lock().unwrap(); let mut response = None; @@ -134,7 +134,7 @@ fn get_response( } else { let status = r.status(); let headers = r.headers().clone(); - let body = crate::async_runtime::block_on(r.bytes())?; + let body = crate::async_runtime::safe_block_on(r.bytes())?; let response = CachedResponse { status, headers,