Repository: tauri
Issue: [bug] cargo tauri ios build with -c configuration override fails to build
Labels: type: bug,status: needs triage

### Describe the bug

Hello,

We have an issue when overriding configuration at build time, in order to have distinct package identifier in dev or release.

the command `cargo tauri ios build` build the `.ipa` as expected, asking for the keychain and everything to build the app.

then the `cargo tauri ios build -c ./src-tauri/tauri.conf-release.json`
where tauri.conf-release.json => (same values but "prd" in place of "dev")
```sh
{
  "productName": "supermobileapp.prd",
  "identifier": "com.awesome.prd.supermobileapp"
}
```
fails at 
```
    /bin/sh -c /Users/me/Library/Developer/Xcode/DerivedData/supermobileapp-hjxnjxtlmccquodlbefzjuhxqfgw/Build/Intermediates.noindex/supermobileapp.build/release-iphoneos/supermobileapp_iOS.build/Script-9580F20638C11F3BDA18A1D4.sh
    Debug [jsonrpsee-client] Connecting to target: Target { sockaddrs: [127.0.0.1:50565], host: "127.0.0.1", host_header: "127.0.0.1:50565", _mode: Plain, path_and_query: "/" }
    Debug [jsonrpsee-client] Failed to connect to sockaddr: 127.0.0.1:50565
    Debug [jsonrpsee-client] Connecting to target: Target { sockaddrs: [], host: "127.0.0.1", host_header: "127.0.0.1:50565", _mode: Plain, path_and_query: "/" }
    Debug [jsonrpsee-client] Connecting to target: Target { sockaddrs: [], host: "127.0.0.1", host_header: "127.0.0.1:50565", _mode: Plain, path_and_query: "/" }
    Debug [jsonrpsee-client] Connecting to target: Target { sockaddrs: [], host: "127.0.0.1", host_header: "127.0.0.1:50565", _mode: Plain, path_and_query: "/" }
    Debug [jsonrpsee-client] Connecting to target: Target { sockaddrs: [], host: "127.0.0.1", host_header: "127.0.0.1:50565", _mode: Plain, path_and_query: "/" }
thread 'main' panicked at /Users/me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-cli-2.0.0-beta.20/src/mobile/mod.rs:282:6:
failed to read CLI options: Error when opening the TCP socket: Connection refused (os error 61)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Command PhaseScriptExecution failed with a nonzero exit code

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution Build\ Rust\ Code /Users/me/Library/Developer/Xcode/DerivedData/supermobileapp-hjxnjxtlmccquodlbefzjuhxqfgw/Build/Intermediates.noindex/supermobileapp.build/release-iphoneos/supermobileapp_iOS.build/Script-9580F20638C11F3BDA18A1D4.sh (in target 'supermobileapp_iOS' from project 'supermobileapp')
(1 failure)
    Error command ["xcodebuild"] exited with code 65
```

Worth to note : there are a lot of `.dev` name in the long list of environment variables passed by the script
So I don't think the -c override really works


### Reproduction

_No response_

### Expected behavior

It should build the .ipa
with .prd bundle ids (overrided by tauri build -c ...)

### Full `tauri info` output

```text
$ cargo tauri info

[✔] 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 (2024-04-24)
    ✔ Rust toolchain: 1.78-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 22.1.0
    - npm: 10.7.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: no manifest (0.37.0, 0.40.0)
    - tao [RUST]: no manifest (0.26.2, 0.28.0)
    - tauri-cli [RUST]: 2.0.0-beta.20
    - @tauri-apps/api [NPM]: 2.0.0-beta.12
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

[-] iOS
    - Developer Teams: ###########
```


### Stack trace

_No response_

### Additional context

_No response_