tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] pnpm/cargo tauri ios dev -> xcodebuild error: no destination and action build

Open stijnfrishert opened this issue 9 months ago • 1 comments

Describe the bug

When I create an empty beta mobile project, and then run these steps:

  1. pnpm install
  2. pnpm tauri ios init
  3. pnpm tauri ios dev

I run into the following error:

> [email protected] tauri /Users/stijn/Desktop/temp
> tauri "ios" "dev"

Detected connected device: Shiva (228) (iPhone12,1) with target "aarch64-apple-ios"
    Info Using 192.168.188.28 to access the development server.
    Running BeforeDevCommand (`pnpm dev`)

> [email protected] dev /Users/stijn/Desktop/temp
> vite


  VITE v5.2.11  ready in 663 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: http://192.168.188.28:1420/
    Info detected host target triple "x86_64-apple-darwin"
Building app...
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -scheme temp_iOS -workspace /Users/stijn/Desktop/temp/src-tauri/gen/apple/temp.xcodeproj/project.xcworkspace/ -sdk iphoneos -configuration debug -arch arm64 -allowProvisioningUpdates build

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
    ARCHS = arm64
    SDKROOT = iphoneos17.5

2024-05-24 22:51:04.093 xcodebuild[93224:1426251] Writing error result bundle to /var/folders/rl/54kg0hgn33183z1svr_jl9zr0000gn/T/ResultBundle_2024-24-05_22-51-0004.xcresult
xcodebuild: error: Found no destinations for the scheme 'temp_iOS' and action build.
    Error command ["xcodebuild"] exited with code 70

Reproduction

  1. cargo create-tauri-app --beta
  2. Project name: temp
  3. Frontend language: Typescript / Javascript
  4. Package manager: pnpm
  5. UI Template: React
  6. UI flavor: Typescript
  7. Setup for mobile? Yes

And then follow the steps for iOS development.

Expected behavior

The app builds and runs on my iPhone.

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.5.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.12.2
    - pnpm: 9.1.2
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.20
    - tauri-build [RUST]: 2.0.0-beta.16
    - wry [RUST]: 0.40.0
    - tao [RUST]: 0.28.0
    - tauri-cli [RUST]: 2.0.0-beta.17
    - @tauri-apps/api [NPM]: 2.0.0-beta.12
    - @tauri-apps/cli [NPM]: 2.0.0-beta.17

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

[-] iOS
    - Developer Teams: <redacted>

Additional context

pnpm tauri dev (without ios works fine)

stijnfrishert avatar May 24 '24 21:05 stijnfrishert