Skip to content

Commit cbd9755

Browse files
authored
fix: process logs not showing on iOS (#8977)
1 parent 9cc014f commit cbd9755

File tree

8 files changed

+36
-13
lines changed

8 files changed

+36
-13
lines changed

.changes/fix-ios-dev-logs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@tauri-apps/cli": patch:bug
3+
"tauri-cli": patch:bug
4+
---
5+
6+
Fixes process logs not showing on `ios dev`.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/tauri-runtime-wry/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,6 +2723,15 @@ fn handle_user_message<T: UserEvent>(
27232723
}
27242724
}
27252725
Message::Webview(window_id, webview_id, webview_message) => {
2726+
#[cfg(any(
2727+
target_os = "macos",
2728+
windows,
2729+
target_os = "linux",
2730+
target_os = "dragonfly",
2731+
target_os = "freebsd",
2732+
target_os = "netbsd",
2733+
target_os = "openbsd"
2734+
))]
27262735
if let WebviewMessage::Reparent(new_parent_window_id) = webview_message {
27272736
let webview_handle = windows.0.borrow_mut().get_mut(&window_id).and_then(|w| {
27282737
w.webviews

core/tauri/mobile/ios-api/Sources/Tauri/Logger.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,19 @@ public class Logger {
3737
}
3838

3939
public static func debug(_ items: Any..., category: String = "app") {
40+
#if DEBUG
41+
Logger.log(items, category: category, type: OSLogType.default)
42+
#else
4043
Logger.log(items, category: category, type: OSLogType.debug)
44+
#endif
4145
}
4246

4347
public static func info(_ items: Any..., category: String = "app") {
48+
#if DEBUG
49+
Logger.log(items, category: category, type: OSLogType.default)
50+
#else
4451
Logger.log(items, category: category, type: OSLogType.info)
52+
#endif
4553
}
4654

4755
public static func error(_ items: Any..., category: String = "app") {

core/tauri/scripts/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
true)
7272

7373
const action = () => {
74-
window.window.__TAURI_INTERNALS__.ipc({
74+
window.__TAURI_INTERNALS__.ipc({
7575
cmd,
7676
callback,
7777
error,

examples/api/src-tauri/Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/cli/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ name = "cargo-tauri"
3939
path = "src/main.rs"
4040

4141
[dependencies]
42-
cargo-mobile2 = { version = "0.10.2", default-features = false }
42+
cargo-mobile2 = { version = "0.10.3", default-features = false }
4343
jsonrpsee = { version = "0.20", features = [ "server" ] }
4444
jsonrpsee-core = "0.20"
4545
jsonrpsee-client-transport = { version = "0.20", features = [ "ws" ] }

0 commit comments

Comments
 (0)