Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

println don't show in the terminal and how to turn off the ios info(too much) . #10090

Closed
songjiachao opened this issue Jun 19, 2024 · 2 comments
Labels
platform: iOS status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@songjiachao
Copy link

Describe the bug

image

Reproduction

No response

Expected behavior

No response

Full tauri info output

➜  app git:(0.7.0) cargo tauri info  

[✔] Environment
    - OS: Mac OS 14.5.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.14.0
    - pnpm: 9.4.0
    - npm: 10.7.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.1
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-beta.20
    - @tauri-apps/api [NPM]: 2.0.0-beta.13
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: https://localhost:1420/
    - framework: Vue.js
    - bundler: Vite

[-] iOS
    - Developer Teams: None

Stack trace

No response

Additional context

No response

@songjiachao songjiachao added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jun 19, 2024
@pewsheen
Copy link
Contributor

The device log seems not able to be disabled now because it's hardcoded: https://github.com/tauri-apps/cargo-mobile2/blob/46c0a4209bafa456ce1fca2ea0265c382a1f21bb/src/apple/device/simctl/run.rs#L74-L77

For the println, stdout from the application is somehow suppressed while running. What I did before was use NSLog to let it print to the log. If you want to try NSLog, here's a reference https://github.com/pewsheen/nslog-rs/blob/main/src/lib.rs . But I think there must be a better way to achieve it.

@FabianLars
Copy link
Member

But I think there must be a better way to achieve it.

You can use tauri-plugin-log and the log crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: iOS status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants