appium-xcuitest-driver 10.17.0 → 10.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,8 +7,9 @@ import {buildSafariPreferences, SAFARI_BUNDLE_ID} from '../app-utils';
7
7
  import {log as defaultLogger} from '../logger';
8
8
  import { Devicectl } from 'node-devicectl';
9
9
  import type { AppiumLogger } from '@appium/types';
10
- import type { XCUITestDriver } from '../driver';
10
+ import type { XCUITestDriver, XCUITestDriverOpts } from '../driver';
11
11
  import {AfcClient} from './afc-client';
12
+ import {isIos18OrNewer} from '../utils';
12
13
 
13
14
  const DEFAULT_APP_INSTALLATION_TIMEOUT_MS = 8 * 60 * 1000;
14
15
  export const IO_TIMEOUT_MS = 4 * 60 * 1000;
@@ -264,10 +265,11 @@ export class RealDevice {
264
265
  readonly udid: string;
265
266
  private readonly _log: AppiumLogger;
266
267
  readonly devicectl: Devicectl;
267
- private platformVersion: string | undefined;
268
+ readonly driverOpts: XCUITestDriverOpts;
268
269
 
269
- constructor(udid: string, logger?: AppiumLogger) {
270
+ constructor(udid: string, driverOpts: XCUITestDriverOpts, logger?: AppiumLogger) {
270
271
  this.udid = udid;
272
+ this.driverOpts = driverOpts;
271
273
  this._log = logger ?? defaultLogger;
272
274
  this.devicectl = new Devicectl(this.udid);
273
275
  }
@@ -294,8 +296,7 @@ export class RealDevice {
294
296
  timeoutMs = IO_TIMEOUT_MS,
295
297
  } = opts;
296
298
  const timer = new timing.Timer().start();
297
- const platformVersion = await this.getPlatformVersion();
298
- const useRemoteXPC = !!platformVersion && util.compareVersions(platformVersion, '>=', '18.0');
299
+ const useRemoteXPC = isIos18OrNewer(this.driverOpts);
299
300
  const afcClient = await AfcClient.createForDevice(this.udid, useRemoteXPC);
300
301
  try {
301
302
  let bundlePathOnPhone: string;
@@ -516,10 +517,7 @@ export class RealDevice {
516
517
  }
517
518
 
518
519
  async getPlatformVersion(): Promise<string> {
519
- if (!this.platformVersion) {
520
- this.platformVersion = await utilities.getOSVersion(this.udid) as string;
521
- }
522
- return this.platformVersion;
520
+ return await utilities.getOSVersion(this.udid);
523
521
  }
524
522
 
525
523
  async reset(opts: {bundleId?: string; fullReset?: boolean}): Promise<void> {
package/lib/driver.ts CHANGED
@@ -1362,7 +1362,7 @@ export class XCUITestDriver
1362
1362
  }
1363
1363
 
1364
1364
  this.log.debug(`Creating iDevice object with udid '${this.opts.udid}'`);
1365
- const device = new RealDevice(this.opts.udid as string, this.log);
1365
+ const device = new RealDevice(this.opts.udid as string, this.opts, this.log);
1366
1366
  return {device, realDevice: true, udid: this.opts.udid as string};
1367
1367
  }
1368
1368
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appium-xcuitest-driver",
3
- "version": "10.17.0",
3
+ "version": "10.18.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-xcuitest-driver",
9
- "version": "10.17.0",
9
+ "version": "10.18.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@appium/strongbox": "^1.0.0-rc.1",
@@ -15,7 +15,7 @@
15
15
  "appium-ios-device": "^3.0.0",
16
16
  "appium-ios-simulator": "^8.0.0",
17
17
  "appium-remote-debugger": "^15.2.0",
18
- "appium-webdriveragent": "^11.1.0",
18
+ "appium-webdriveragent": "^11.1.1",
19
19
  "appium-xcode": "^6.0.2",
20
20
  "async-lock": "^1.4.0",
21
21
  "asyncbox": "^4.0.1",
@@ -122,6 +122,12 @@
122
122
  "node": ">=16"
123
123
  }
124
124
  },
125
+ "node_modules/@appium/base-driver/node_modules/lodash": {
126
+ "version": "4.17.21",
127
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
128
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
129
+ "license": "MIT"
130
+ },
125
131
  "node_modules/@appium/base-plugin": {
126
132
  "version": "3.0.5",
127
133
  "resolved": "https://registry.npmjs.org/@appium/base-plugin/-/base-plugin-3.0.5.tgz",
@@ -165,6 +171,12 @@
165
171
  "npm": ">=10"
166
172
  }
167
173
  },
174
+ "node_modules/@appium/docutils/node_modules/lodash": {
175
+ "version": "4.17.21",
176
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
177
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
178
+ "license": "MIT"
179
+ },
168
180
  "node_modules/@appium/docutils/node_modules/teen_process": {
169
181
  "version": "3.0.4",
170
182
  "resolved": "https://registry.npmjs.org/teen_process/-/teen_process-3.0.4.tgz",
@@ -197,6 +209,12 @@
197
209
  "npm": ">=10"
198
210
  }
199
211
  },
212
+ "node_modules/@appium/logger/node_modules/lodash": {
213
+ "version": "4.17.21",
214
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
215
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
216
+ "license": "MIT"
217
+ },
200
218
  "node_modules/@appium/schema": {
201
219
  "version": "1.0.0",
202
220
  "resolved": "https://registry.npmjs.org/@appium/schema/-/schema-1.0.0.tgz",
@@ -275,6 +293,12 @@
275
293
  "sharp": "0.34.5"
276
294
  }
277
295
  },
296
+ "node_modules/@appium/support/node_modules/lodash": {
297
+ "version": "4.17.21",
298
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
299
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
300
+ "license": "MIT"
301
+ },
278
302
  "node_modules/@appium/support/node_modules/teen_process": {
279
303
  "version": "3.0.4",
280
304
  "resolved": "https://registry.npmjs.org/teen_process/-/teen_process-3.0.4.tgz",
@@ -692,9 +716,9 @@
692
716
  }
693
717
  },
694
718
  "node_modules/appium-ios-remotexpc": {
695
- "version": "0.26.0",
696
- "resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.26.0.tgz",
697
- "integrity": "sha512-9c7z05u2vlwhn6OPyY60Tfug3U5LPNw1k6Se0qTRUxnGs7ttWltk+5Dn+QUy4XDRKCtogmv/azVWHBlfIz2xKg==",
719
+ "version": "0.26.1",
720
+ "resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.26.1.tgz",
721
+ "integrity": "sha512-Bg548uTyRa2I0enFH5K5maD8vj97JBGdh61hE5dpfN1GRJC43LoQ0D07dD6N18tPtrS5LtC1uxYYrhG+iQj/XQ==",
698
722
  "license": "Apache-2.0",
699
723
  "optional": true,
700
724
  "dependencies": {
@@ -752,16 +776,16 @@
752
776
  }
753
777
  },
754
778
  "node_modules/appium-remote-debugger": {
755
- "version": "15.2.10",
756
- "resolved": "https://registry.npmjs.org/appium-remote-debugger/-/appium-remote-debugger-15.2.10.tgz",
757
- "integrity": "sha512-1Ez76NmzuiyF8tWMTgczgTidAF0HIV8PvWVjaxxjnQTuuwqAMpZ9bPv+iWwETAhPlC5vL/SSb7dU73HEki1vGw==",
779
+ "version": "15.2.13",
780
+ "resolved": "https://registry.npmjs.org/appium-remote-debugger/-/appium-remote-debugger-15.2.13.tgz",
781
+ "integrity": "sha512-tXFTHp+fUR13cjJH/O7gd1PPm+jsWAvfFQSJuSdoRzwF3EanP2l+EetCG0gyiSWHQ01T97iRHKlKeqYG8BeHPw==",
758
782
  "license": "Apache-2.0",
759
783
  "dependencies": {
760
784
  "@appium/base-driver": "^10.0.0-rc.1",
761
785
  "@appium/support": "^7.0.0-rc.1",
762
786
  "appium-ios-device": "^3.0.0",
763
787
  "async-lock": "^1.4.1",
764
- "asyncbox": "^4.0.1",
788
+ "asyncbox": "^5.0.0",
765
789
  "bluebird": "^3.4.7",
766
790
  "glob": "^13.0.0",
767
791
  "lodash": "^4.17.11",
@@ -772,10 +796,24 @@
772
796
  "npm": ">=10"
773
797
  }
774
798
  },
799
+ "node_modules/appium-remote-debugger/node_modules/asyncbox": {
800
+ "version": "5.0.0",
801
+ "resolved": "https://registry.npmjs.org/asyncbox/-/asyncbox-5.0.0.tgz",
802
+ "integrity": "sha512-F2D847Y1W4mJMBLvwN+1+l7dsS9uBq+Q9U3RqSih+zZ9d810/vMr0PXPF5OUGERtVVTXM6hVW80yFa3MXyIo7Q==",
803
+ "license": "Apache-2.0",
804
+ "dependencies": {
805
+ "bluebird": "^3.5.1",
806
+ "lodash": "^4.17.4"
807
+ },
808
+ "engines": {
809
+ "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
810
+ "npm": ">=10"
811
+ }
812
+ },
775
813
  "node_modules/appium-webdriveragent": {
776
- "version": "11.1.0",
777
- "resolved": "https://registry.npmjs.org/appium-webdriveragent/-/appium-webdriveragent-11.1.0.tgz",
778
- "integrity": "sha512-Ve9n+QIM4JUwTvKKeuaVvyra1k02JAcNsmgTtbx3fNItEzuC/s4LjEvqoxdr5KAjGAIz/Np5Efqn6S1WyvEiZQ==",
814
+ "version": "11.1.1",
815
+ "resolved": "https://registry.npmjs.org/appium-webdriveragent/-/appium-webdriveragent-11.1.1.tgz",
816
+ "integrity": "sha512-BWB1oFOzteMmlkeRUV9u3TDG187fnP3Vnr05RZcBjh5LI+qeKYRQHFl1VtU56V8Tjwujn4RlUhfwZQofMlxO3Q==",
779
817
  "license": "Apache-2.0",
780
818
  "dependencies": {
781
819
  "@appium/base-driver": "^10.0.0-rc.1",
@@ -828,6 +866,12 @@
828
866
  "node": ">=16"
829
867
  }
830
868
  },
869
+ "node_modules/appium/node_modules/lodash": {
870
+ "version": "4.17.21",
871
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
872
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
873
+ "license": "MIT"
874
+ },
831
875
  "node_modules/appium/node_modules/readable-stream": {
832
876
  "version": "3.6.2",
833
877
  "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
@@ -2761,9 +2805,9 @@
2761
2805
  }
2762
2806
  },
2763
2807
  "node_modules/lodash": {
2764
- "version": "4.17.21",
2765
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
2766
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
2808
+ "version": "4.17.23",
2809
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
2810
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
2767
2811
  "license": "MIT"
2768
2812
  },
2769
2813
  "node_modules/lodash.isfinite": {
@@ -4418,12 +4462,11 @@
4418
4462
  }
4419
4463
  },
4420
4464
  "node_modules/teen_process": {
4421
- "version": "4.0.7",
4422
- "resolved": "https://registry.npmjs.org/teen_process/-/teen_process-4.0.7.tgz",
4423
- "integrity": "sha512-t7+1xY+WfihWM8M2JxL9ueH/SfDE7bhMuuVMR8bqrttQ0nn95hvOpGqThtZ2S/4+RvrJx2+UWO9no7wDFrOdsw==",
4465
+ "version": "4.0.8",
4466
+ "resolved": "https://registry.npmjs.org/teen_process/-/teen_process-4.0.8.tgz",
4467
+ "integrity": "sha512-0DTX2KfgVOr6+8TVmheEdiJHZ/bPOPeJuX0yvv5VOX3x+OFteNkmWkI+hX6zTkzxjddrktsrXkacfS2Gom1YyA==",
4424
4468
  "license": "Apache-2.0",
4425
4469
  "dependencies": {
4426
- "bluebird": "^3.7.2",
4427
4470
  "lodash": "^4.17.21",
4428
4471
  "shell-quote": "^1.8.1"
4429
4472
  },
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "xcuitest",
9
9
  "xctest"
10
10
  ],
11
- "version": "10.17.0",
11
+ "version": "10.18.0",
12
12
  "author": "Appium Contributors",
13
13
  "license": "Apache-2.0",
14
14
  "repository": {
@@ -83,7 +83,7 @@
83
83
  "appium-ios-device": "^3.0.0",
84
84
  "appium-ios-simulator": "^8.0.0",
85
85
  "appium-remote-debugger": "^15.2.0",
86
- "appium-webdriveragent": "^11.1.0",
86
+ "appium-webdriveragent": "^11.1.1",
87
87
  "appium-xcode": "^6.0.2",
88
88
  "async-lock": "^1.4.0",
89
89
  "asyncbox": "^4.0.1",