tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Trying to build for connected ios device, receive error: missing project.yml file in the Xcode project directory: No such file or directory (os error 2)

Open soultech67 opened this issue 7 months ago • 3 comments

Describe the bug

When I run pnpm tauri ios build from my src-tauri folder I receive this error:

pnpm tauri ios build -v
       Debug [tauri_cli::helpers::app_paths] Found Tauri project inside /Users/scott/projects/<remo name>/packages/web/src-tauri on early lookup
       Debug [cargo_mobile2::apple::teams] found cert "Apple Development: <my email>@gmail.com (8274SCY2T3)" with organization "<my name>"
       Debug [cargo_mobile2::apple::teams] found cert "Apple Development: <my email>@gmail.com (8274SCY2T3)" with organization "<my name>"
missing project.yml file in the Xcode project directory: No such file or directory (os error 2)
       Error [tauri_cli_node] missing project.yml file in the Xcode project directory: No such file or directory (os error 2)

However, in my src-tauri/gen/apple folder there's a project.yml file present

ll gen/apple
total 40
drwxr-xr-x@ 16 scott  staff   512 May 31 14:49 .
drwxr-xr-x@  4 scott  staff   128 May  6 17:22 ..
-rw-r--r--@  1 scott  staff    30 May 30 18:01 .gitignore
drwxr-xr-x@  4 scott  staff   128 May 30 18:01 app_iOS
drwxr-xr-x@  5 scott  staff   160 May 31 15:01 app.xcodeproj
drwxr-xr-x@  2 scott  staff    64 May  6 17:22 assets
drwxr-xr-x@  6 scott  staff   192 May 30 18:01 Assets.xcassets
drwxr-xr-x@ 12 scott  staff   384 May  8 12:12 build
-rw-r--r--@  1 scott  staff   241 May 30 18:01 ExportOptions.plist
drwxr-xr-x@  4 scott  staff   128 May  7 09:40 Externals
drwxr-xr-x@  2 scott  staff    64 May 31 14:49 Fudger_iOS
drwxr-xr-x@  3 scott  staff    96 May 31 14:49 Fudger.xcodeproj
-rw-r--r--@  1 scott  staff  1845 May 30 18:01 LaunchScreen.storyboard
-rw-r--r--@  1 scott  staff   565 May 30 18:01 Podfile
-rw-r--r--@  1 scott  staff  3152 May 30 18:01 project.yml    <==
drwxr-xr-x@  4 scott  staff   128 May 31 14:49 Sources

tauri info shows this output:

pnpm tauri info

[✔] Environment
    - OS: Mac OS 15.5.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
    ✔ cargo: 1.87.0 (99624be96 2025-05-06)
    ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 23.11.0
    - pnpm: 10.10.0
    - yarn: 1.22.22
    - npm: 11.3.0

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-log 🦀: 2.4.0
    - @tauri-apps/plugin-log : 2.4.0

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

[-] iOS
    - Developer Teams: <my name> (ID: 4LRLJPJ75Q)

I tried re-generating the apple project with pnpm tauri ios init, which completed successfully, but I continue to be unable to build or dev the project onto my connected iPhone.

Reproduction

cd <project>/src-tauri
pnpm tauri ios build
missing project.yml file in the Xcode project directory: No such file or directory (os error 2)
       Error missing project.yml file in the Xcode project directory: No such file or directory (os error 2)

Expected behavior

The build used to succeed, it worked fine the last time I ran it.

Full tauri info output

pnpm tauri info

[✔] Environment
    - OS: Mac OS 15.5.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
    ✔ cargo: 1.87.0 (99624be96 2025-05-06)
    ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 23.11.0
    - pnpm: 10.10.0
    - yarn: 1.22.22
    - npm: 11.3.0

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-log 🦀: 2.4.0
    - @tauri-apps/plugin-log : 2.4.0

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

[-] iOS
    - Developer Teams: <my name> (ID: 4LRLJPJ75Q)

Stack trace


Additional context

I upgraded cargo to tauri 2.5.1 since the last time I ran the build. I was on 2.5.0 previously

soultech67 avatar May 31 '25 22:05 soultech67

I downgraded to 2.5.0 to see if that would fix it but I get the same error with 2.5.0 and 2.5.1 :(

cargo info tauri
tauri
Make tiny, secure apps for all desktop platforms with Tauri
version: 2.5.0 (latest 2.5.1)
license: Apache-2.0 OR MIT
rust-version: 1.77.2
documentation: https://docs.rs/tauri/2.5.0
homepage: https://tauri.app/
repository: https://github.com/tauri-apps/tauri
crates.io: https://crates.io/crates/tauri/2.5.0
features:
 +default                                        = [wry, compression, common-controls-v6]
  common-controls-v6                             = [tray-icon?/common-controls-v6, muda/common-controls-v6]
  compression                                    = [tauri-macros/compression, tauri-utils/compression]
  tauri-runtime-wry                              = [dep:tauri-runtime-wry]
  webkit2gtk                                     = [dep:webkit2gtk]
  webview2-com                                   = [dep:webview2-com]
  wry                                            = [webview2-com, webkit2gtk, tauri-runtime-wry]
  26 deactivated features

soultech67 avatar May 31 '25 22:05 soultech67

I'm literally blocked by this. Can you at least tell me where its looking for the project.yml file? It would be useful to have that data emitted with the -v flag. I'm not sure how to debug this any further without additional information.

I just invested a month of my time migrating my project into Tauri and this is a horrible blocker. I need to test the app on my devices to continue to make progress.

soultech67 avatar Jun 04 '25 00:06 soultech67

Issue: I encountered the following similar error during the build process: pnpm tauri ios dev --open Then in the Xcode, I've tried to build the app to test.

missing project.yml file in the Xcode project directory: Operation not permitted (os error 1)
Error [tauri_cli_node] missing project.yml file in the Xcode project directory: Operation not permitted (os error 1)

Fix: After deleting the app folder in tauri-project/src-tauri/gen/apple and running the following:

pnpm tauri ios init
pnpm tauri ios dev --open

The build process worked as expected, and the issue was resolved.

I suspect it's because User Script Sandboxing is enabled since the Xcode is recommended to do that (I might occasionally click to perform that changes before). @soultech67

capret avatar Jun 06 '25 04:06 capret

Fix: After deleting the app folder in tauri-project/src-tauri/gen/apple and running the following:

pnpm tauri ios init
pnpm tauri ios dev --open

The build process worked as expected, and the issue was resolved.

I suspect it's because User Script Sandboxing is enabled since the Xcode is recommended to do that (I might occasionally click to perform that changes before). @soultech67

I reproduced this issue by modifying the package name in Cargo.toml after running pnpm tauri ios init

AprilNEA avatar Jun 30 '25 05:06 AprilNEA

Fix: After deleting the app folder in tauri-project/src-tauri/gen/apple and running the following:

pnpm tauri ios init
pnpm tauri ios dev --open

The build process worked as expected, and the issue was resolved. I suspect it's because User Script Sandboxing is enabled since the Xcode is recommended to do that (I might occasionally click to perform that changes before). @soultech67

I reproduced this issue by modifying the package name in Cargo.toml after running pnpm tauri ios init

great insight, I'll fix this

lucasfernog avatar Aug 27 '25 20:08 lucasfernog