diff --git a/CHANGELOG.md b/CHANGELOG.md index b85fe77..68d6730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [2.0.3](https://github.com/ionic-team/native-run/compare/v2.0.2...v2.0.3) (2026-01-08) + + +### Bug Fixes + +* Support wireless iOS devices ([#398](https://github.com/ionic-team/native-run/issues/398)) ([cf7a229](https://github.com/ionic-team/native-run/commit/cf7a2290d662d0dc087957a86b581d1447a6587e)) + +## [2.0.2](https://github.com/ionic-team/native-run/compare/v2.0.1...v2.0.2) (2026-01-07) + + +### Bug Fixes + +* **android:** select available emulator port and improve emulator detection ([#399](https://github.com/ionic-team/native-run/issues/399)) ([45745fe](https://github.com/ionic-team/native-run/commit/45745fe2897c6cbded83bc735f66f910c0351018)) + ## [2.0.1](https://github.com/ionic-team/native-run/compare/v2.0.0...v2.0.1) (2024-01-25) diff --git a/package.json b/package.json index 48a3ef8..d85b700 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "native-run", - "version": "2.0.1", + "version": "2.0.3", "description": "A CLI for running apps on iOS/Android devices and simulators/emulators", "bin": { "native-run": "bin/native-run" diff --git a/src/ios/utils/simulator.ts b/src/ios/utils/simulator.ts index ebe8a4c..99e4ade 100644 --- a/src/ios/utils/simulator.ts +++ b/src/ios/utils/simulator.ts @@ -5,7 +5,7 @@ import { Exception } from '../../errors'; import { log } from '../../utils/log'; import { onBeforeExit } from '../../utils/process'; -import { getXCodePath } from './xcode'; +import { getXCodePath, getXcodeVersionInfo } from './xcode'; const debug = Debug('native-run:ios:utils:simulator'); @@ -84,12 +84,13 @@ export async function runOnSimulator(udid: string, appPath: string, bundleId: st } const xCodePath = await getXCodePath(); + const [xcodeVersion] = getXcodeVersionInfo(); + const xcodeMajorVersion = Number(xcodeVersion.split('.')[0]); + const simulatorAppPath = + xcodeMajorVersion >= 27 ? `${xCodePath}/../Applications/DeviceHub.app` : `${xCodePath}/Applications/Simulator.app`; + debug(`Running simulator ${udid}`); - const openResult = spawnSync( - 'open', - [`${xCodePath}/Applications/Simulator.app`, '--args', '-CurrentDeviceUDID', udid], - { encoding: 'utf8' }, - ); + const openResult = spawnSync('open', [simulatorAppPath, '--args', '-CurrentDeviceUDID', udid], { encoding: 'utf8' }); if (openResult.status) { throw new Exception(`There was an error opening simulator: ${openResult.stderr}`); }