Repository: tauri
Issue: [bug] tauri mobile iOS Xcode: build script fails to run
Labels: type: bug,status: needs triage

### Describe the bug

follow office tutorial create ios app failed with macOS 14.1 (Sanoma) and XCode (15.4). Executing the build script inside xcode throws "Command PhaseScriptExecution failed with a nonzero exit code". Is this an xcode or tauri bug?




### Reproduction

following the tutorial: https://v2.tauri.app/start/

### Expected behavior

_No response_

### Full `tauri info` output

```text
[✔] Environment
    - OS: Mac OS 14.1.0 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.9.0
    - pnpm: 9.3.0
    - yarn: 1.22.21
    - npm: 10.8.3


[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - tauri-cli 🦀: 2.1.0
    - @tauri-apps/api : 2.1.1
    - @tauri-apps/cli : 2.1.0

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : 2.0.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
```
```


### Stack trace
    /usr/bin/sandbox-exec -D SCRIPT_OUTPUT_FILE_0\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/x86_64/debug/libapp.a -D SCRIPT_OUTPUT_FILE_1\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/arm64/debug/libapp.a -D SCRIPT_OUTPUT_FILE_2\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/arm64-sim/debug/libapp.a -D SCRIPT_INPUT_FILE_0\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build/Script-4CFF21EFA1FFE4D2AB9D6998.sh -D SCRIPT_INPUT_ANCESTOR_0\=/ -D SCRIPT_INPUT_ANCESTOR_1\=/Users -D SCRIPT_INPUT_ANCESTOR_2\=/Users/margulus -D SCRIPT_INPUT_ANCESTOR_3\=/Users/margulus/Library -D SCRIPT_INPUT_ANCESTOR_4\=/Users/margulus/Library/Developer -D SCRIPT_INPUT_ANCESTOR_5\=/Users/margulus/Library/Developer/Xcode -D SCRIPT_INPUT_ANCESTOR_6\=/Users/margulus/Library/Developer/Xcode/DerivedData -D SCRIPT_INPUT_ANCESTOR_7\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa -D SCRIPT_INPUT_ANCESTOR_8\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build -D SCRIPT_INPUT_ANCESTOR_9\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex -D SCRIPT_INPUT_ANCESTOR_10\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build -D SCRIPT_INPUT_ANCESTOR_11\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator -D SCRIPT_INPUT_ANCESTOR_12\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build -D SCRIPT_OUTPUT_ANCESTOR_0\=/ -D SCRIPT_OUTPUT_ANCESTOR_1\=/Users -D SCRIPT_OUTPUT_ANCESTOR_2\=/Users/margulus -D SCRIPT_OUTPUT_ANCESTOR_3\=/Users/margulus/Desktop -D SCRIPT_OUTPUT_ANCESTOR_4\=/Users/margulus/Desktop/tauri-app -D SCRIPT_OUTPUT_ANCESTOR_5\=/Users/margulus/Desktop/tauri-app/src-tauri -D SCRIPT_OUTPUT_ANCESTOR_6\=/Users/margulus/Desktop/tauri-app/src-tauri/gen -D SCRIPT_OUTPUT_ANCESTOR_7\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple -D SCRIPT_OUTPUT_ANCESTOR_8\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals -D SCRIPT_OUTPUT_ANCESTOR_9\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/arm64 -D SCRIPT_OUTPUT_ANCESTOR_10\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/arm64-sim -D SCRIPT_OUTPUT_ANCESTOR_11\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/arm64-sim/debug -D SCRIPT_OUTPUT_ANCESTOR_12\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/arm64/debug -D SCRIPT_OUTPUT_ANCESTOR_13\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/x86_64 -D SCRIPT_OUTPUT_ANCESTOR_14\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple/Externals/x86_64/debug -D SRCROOT\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple -D PROJECT_DIR\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple -D OBJROOT\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex -D SYMROOT\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Products -D DSTROOT\=/tmp/tauri-app.dst -D SHARED_PRECOMPS_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/PrecompiledHeaders -D CACHE_ROOT\=/var/folders/3r/kthfgzk132787z5lk5ttmj7h0000gn/C/com.apple.DeveloperTools/15.4-15F31d/Xcode -D CONFIGURATION_BUILD_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Products/debug-iphonesimulator -D CONFIGURATION_TEMP_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator -D LOCROOT\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple -D LOCSYMROOT\=/Users/margulus/Desktop/tauri-app/src-tauri/gen/apple -D INDEX_PRECOMPS_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Index.noindex/PrecompiledHeaders -D INDEX_DATA_STORE_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Index.noindex/DataStore -D TEMP_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build -D TARGET_TEMP_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build -D DERIVED_FILE_DIR\=/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build/DerivedSources -f /Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build/f48efc9a63705f103bcc271d039ac5b9.sb /bin/sh -c /Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build/Script-4CFF21EFA1FFE4D2AB9D6998.sh
/Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build/Script-4CFF21EFA1FFE4D2AB9D6998.sh: line 2: ARCHS: parameter null or not set
Command PhaseScriptExecution failed with a nonzero exit code

warning: None of the architectures in ARCHS (arm64, x86_64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64-sim) which is not in EXCLUDED_ARCHS (arm64). (in target 'tauri-app_iOS' from project 'tauri-app')
note: Run script build phase 'Build Rust Code' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'tauri-app_iOS' from project 'tauri-app')
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution Build\ Rust\ Code /Users/margulus/Library/Developer/Xcode/DerivedData/tauri-app-fvrmxhfhuydvyvaskbqddwxjubwa/Build/Intermediates.noindex/tauri-app.build/debug-iphonesimulator/tauri-app_iOS.build/Script-4CFF21EFA1FFE4D2AB9D6998.sh (in target 'tauri-app_iOS' from project 'tauri-app')
(1 failure)
command ["xcodebuild"] exited with code 65
    Error command ["xcodebuild"] exited with code 65
error Command failed with exit code 1.

### Additional context

_No response_