follow-up for #493
this allows the Tauri CLI to detect stale emulators and restart them
since we need to match on the emulator name, i also added a new method to get the device name via the emulator console: https://developer.android.com/studio/run/emulator-console
to properly restart the emulator we need to pass `-no-snapshot-load` so that's why the new start_detached_with_options was added
* fix(android): prevent adb::device_list deadlock due to shell stuck
when an emulator gets in a weird state and disconnects from adb, `adb shell` gets stuck and never resolves; we're now adding a timeout to prevent the CLI from appear in a deadlock state, and return the error instead
* import
* feat(apple): enhance opening Xcode
detect the selected Xcode path with `xcode-select -p` so a custom Xcode path like `/Applications/Xcode-26.app` can work
closes http://github.com/tauri-apps/tauri/issues/14238
* clippy
currently deps are only installed on init, which might not be executed on someone's machine if the xcode project is commited to the repo. we need to ensure dependencies are installed before running them
Xcode 16.3 seems to break the __preview.dylib generation when we use custom architectures (arm64-sim). In this case the `-sim` prefix is incorrectly appended to the target triple sent to clang. Let's try using the "Simulator" arch that Xcode sends us.
`Target::for_arch` still uses the arm64-sim string to differentiate regular iOS arm64 builds with simulator ones.
* Fix: Handle empty hardwareProperties JSON output from devicectl
The devicectl command can sometimes output what seems like invalid JSON.
For example:
```
"result" : {
"devices" : [
{
"capabilities" : [
{
"featureIdentifier" : "com.apple.coredevice.feature.tags",
"name" : "Modify Tags"
}
],
"connectionProperties" : {
"isMobileDeviceOnly" : false,
"pairingState" : "unpaired",
"potentialHostnames" : [
],
"tunnelState" : "unavailable"
},
"deviceProperties" : {
"bootState" : "booted",
"ddiServicesAvailable" : false
},
"hardwareProperties" : {
},
"identifier" : "781BF0DD-XXXXXXXXXXXXXXX",
"tags" : [
],
"visibilityClass" : "default"
},
```
Notice the empty object value for `hardwareProperties`. That caused the parse_device_list
method to fail, because the JSON didn't conform to the `DeviceListOutput` type.
That, in turn, caused `device_list` to return an empty list, which in turn caused `list_devices`
to fall back to using `ios-deploy`, which is not compatible with iOS 16+ devices.
The fix in this commit first filters out invalid device entries before actually parsing the
valid entries, thus fixing the error and the effect of incorrectly falling back to ios-deploy.
* cleanup, add tests
* add change file
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
- always use verbose output when running `xcodebuild build` to show cargo output
- enhance simulator and device run output by only displaying app logs by default, and printing full process logs when pedantic verbosity is requested