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

[bug] unresolved import objc2_app_kit::NSImage #11017

Closed
lihe6666 opened this issue Sep 16, 2024 · 0 comments · Fixed by #11016
Closed

[bug] unresolved import objc2_app_kit::NSImage #11017

lihe6666 opened this issue Sep 16, 2024 · 0 comments · Fixed by #11016
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@lihe6666
Copy link

Describe the bug

image

rustc 1.81.0 (eeb90cda1 2024-09-04)
cargo 1.81.0 (2dbb1af80 2024-08-20)

Reproduction

pnpm create tauri-app --rc baby

  1. TypeScript
  2. pnpm
  3. Svelte
  4. TypeScript
  5. pnpm install
  6. pnpm tauri dev
error[E0432]: unresolved import `objc2_app_kit::NSImage`
    --> /Users/developer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-rc.13/src/app.rs:2058:44
     |
2058 |         use objc2_app_kit::{NSApplication, NSImage};
     |                                            ^^^^^^^ no `NSImage` in the root

error[E0599]: no method named `setApplicationIconImage` found for struct `Retained<NSApplication>` in the current scope
    --> /Users/developer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-rc.13/src/app.rs:2067:24
     |
2067 |           unsafe { app.setApplicationIconImage(Some(&app_icon)) };
     |                        ^^^^^^^^^^^^^^^^^^^^^^^ method not found in `Retained<NSApplication>`

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `tauri` (lib) due to 2 previous errors

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.5.0 x86_64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (default)
    - node: 18.20.2
    - pnpm: 9.10.0
    - yarn: 1.22.22
    - npm: 10.5.0

[-] Packages
    - tauri 🦀: 2.0.0-rc.13
    - tauri-build 🦀: 2.0.0-rc.11
    - wry 🦀: 0.43.1
    - tao 🦀: 0.30.0
    - @tauri-apps/api : 2.0.0-rc.4
    - @tauri-apps/cli : 2.0.0-rc.15

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.0-rc.3
    - @tauri-apps/plugin-shell : 2.0.0-rc.1

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

Stack trace

No response

Additional context

No response

@lihe6666 lihe6666 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Sep 16, 2024
@amrbashir amrbashir linked a pull request Sep 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant