tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
85.38k stars 2.58k forks source link

[bug] Xcode Build Failed (bun: command not found) #11625

Open ericchambers-chattie opened 2 weeks ago

ericchambers-chattie commented 2 weeks ago

Describe the bug

I have a working Tauri + Sveltekit example project that was setup using the official Tauri docs. This project was setup using bun. When running tauri ios dev, the project properly runs on the IOS xcode simulation. Running tauri ios dev --open xcode successfully opens, but when starting the project from within Xcode I get Command PhaseScriptExecution failed with a nonzero exit code. Image of the error below:

Screen Shot 2024-11-08 at 9 18 35 AM

I can confirm that bun is properly installed on my computer and within my path, this seems to be that Xcode cannot find bun when being ran. I tried configuring xcode to use my root working directory still with no luck. I can't seem to edit this generated sh file to include the path either.

Reproduction

Create a new tauri sveltekit project from this documentation using bun: https://v2.tauri.app/start/create-project/ Be on MacOS and try opening the Xcode project and then building the Xcode project.

Expected behavior

Xcode should succesfully build the project and open the simulation as if it was being ran from the tauri ios dev command.

Full tauri info output

[✔] Environment
    - OS: Mac OS 12.6.4 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.82.0 (f6e511eec 2024-10-15)
    ✔ cargo: 1.82.0 (8f40fc59f 2024-08-21)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 22.11.0
    - yarn: 1.22.17
    - npm: 10.9.0
    - bun: 1.1.0
    - deno: deno 2.0.4

[-] Packages
    - tauri 🦀: 2.0.6
    - tauri-build 🦀: 2.0.2
    - wry 🦀: 0.46.3
    - tao 🦀: 0.30.5
    - @tauri-apps/api : 2.0.3
    - @tauri-apps/cli : 2.0.5

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : 2.0.1

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

[-] iOS
    - Developer Teams: None

Stack trace

No response

Additional context

No response