appium-ios-remotexpc 0.6.1 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [0.7.0](https://github.com/appium/appium-ios-remotexpc/compare/v0.6.2...v0.7.0) (2025-10-09)
2
+
3
+ ### Features
4
+
5
+ * implement springboard service ([#79](https://github.com/appium/appium-ios-remotexpc/issues/79)) ([eae9b42](https://github.com/appium/appium-ios-remotexpc/commit/eae9b427dfb644a8b67f8eb76505d4aba7094311))
6
+
7
+ ## [0.6.2](https://github.com/appium/appium-ios-remotexpc/compare/v0.6.1...v0.6.2) (2025-10-08)
8
+
9
+ ### Bug Fixes
10
+
11
+ * improve DNS resolution in bonjour service ([#78](https://github.com/appium/appium-ios-remotexpc/issues/78)) ([5cfda64](https://github.com/appium/appium-ios-remotexpc/commit/5cfda643f9e00de3d7e6da51f757ebb90e661757))
12
+
1
13
  ## [0.6.1](https://github.com/appium/appium-ios-remotexpc/compare/v0.6.0...v0.6.1) (2025-10-07)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -4,6 +4,6 @@ import { TunnelRegistryServer, startTunnelRegistryServer } from './lib/tunnel/tu
4
4
  import { Usbmux, createUsbmux } from './lib/usbmux/index.js';
5
5
  import * as Services from './services.js';
6
6
  import { startCoreDeviceProxy } from './services/ios/tunnel-service/index.js';
7
- export type { DiagnosticsService, MobileImageMounterService, NotificationProxyService, MobileConfigService, SyslogService, SocketInfo, TunnelResult, TunnelRegistry, TunnelRegistryEntry, DiagnosticsServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, MobileConfigServiceWithConnection, } from './lib/types.js';
7
+ export type { DiagnosticsService, MobileImageMounterService, NotificationProxyService, MobileConfigService, SpringboardService, SyslogService, SocketInfo, TunnelResult, TunnelRegistry, TunnelRegistryEntry, DiagnosticsServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, MobileConfigServiceWithConnection, SpringboardServiceWithConnection, } from './lib/types.js';
8
8
  export { createUsbmux, Services, Usbmux, TunnelManager, PacketStreamServer, PacketStreamClient, createLockdownServiceByUDID, startCoreDeviceProxy, TunnelRegistryServer, startTunnelRegistryServer, };
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,gCAAgC,EAChC,uCAAuC,EACvC,sCAAsC,EACtC,iCAAiC,GAClC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,gCAAgC,EAChC,uCAAuC,EACvC,sCAAsC,EACtC,iCAAiC,EACjC,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bonjour-discovery.d.ts","sourceRoot":"","sources":["../../../../src/lib/bonjour/bonjour-discovery.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiB3C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,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,MAA+C,EAC5D,MAAM,GAAE,MAA+B,GACtC,OAAO,CAAC,cAAc,CAAC;IAoB1B;;OAEG;IACG,4BAA4B,CAChC,SAAS,GAAE,MAA2C,GACrD,OAAO,CAAC,aAAa,EAAE,CAAC;IAmB3B;;OAEG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAsBzC;;OAEG;YACW,kBAAkB;IA4BhC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAuBhC;;OAEG;YACW,kBAAkB;IAuBhC;;OAEG;IACH,OAAO,CAAC,OAAO;CAMhB"}
@@ -1,6 +1,6 @@
1
1
  import { logger } from '@appium/support';
2
2
  import { spawn } from 'node:child_process';
3
- import { resolve4 } from 'node:dns/promises';
3
+ import { lookup } from 'node:dns/promises';
4
4
  import { EventEmitter } from 'node:events';
5
5
  import { clearTimeout, setTimeout } from 'node:timers';
6
6
  import { setTimeout as delay } from 'node:timers/promises';
@@ -93,11 +93,21 @@ async function waitForProcessResult(process, timeoutMs, outputHandler, timeoutMe
93
93
  log.debug(`[dns-sd] output: ${output}`);
94
94
  try {
95
95
  const handlerResult = outputHandler(output);
96
- if (handlerResult === true) {
97
- result = undefined;
98
- }
99
- else if (handlerResult) {
100
- result = handlerResult;
96
+ if (handlerResult) {
97
+ try {
98
+ process.kill('SIGTERM');
99
+ }
100
+ catch { }
101
+ clearTimeout(timeout);
102
+ isResolved = true;
103
+ if (handlerResult === true) {
104
+ resolve({ success: true });
105
+ }
106
+ else {
107
+ result = handlerResult;
108
+ resolve({ success: true, data: result });
109
+ }
110
+ return;
101
111
  }
102
112
  }
103
113
  catch (error) {
@@ -226,25 +236,16 @@ function shouldSkipLine(line) {
226
236
  * Resolve hostname to IP address
227
237
  */
228
238
  async function resolveIPAddress(hostname) {
239
+ const clean = hostname.endsWith('.') ? hostname.slice(0, -1) : hostname;
229
240
  try {
230
- const address = await resolve4(hostname);
231
- log.info(`[ServiceResolver] Resolved ${hostname} to IPv4: ${address}`);
232
- return address;
241
+ const results = await lookup(clean, { family: 4, all: true });
242
+ const list = Array.isArray(results) ? results : [results];
243
+ const addresses = list.map((r) => r.address);
244
+ log.info(`[ServiceResolver] Resolved ${clean} to IPv4: ${addresses}`);
245
+ return addresses;
233
246
  }
234
247
  catch (error) {
235
- log.warn(`[ServiceResolver] Failed to resolve hostname ${hostname} to IPv4: ${error}`);
236
- // For .local hostnames, try without the trailing dot
237
- if (hostname.endsWith('.local.')) {
238
- const cleanHostname = hostname.slice(0, -1); // Remove trailing dot
239
- try {
240
- const address = await resolve4(cleanHostname);
241
- log.info(`[ServiceResolver] Resolved ${cleanHostname} to IPv4: ${address}`);
242
- return address;
243
- }
244
- catch (retryError) {
245
- log.warn(`[ServiceResolver] Failed to resolve ${cleanHostname} to IPv4: ${retryError}`);
246
- }
247
- }
248
+ log.debug(`[ServiceResolver] IPv4 lookup failed for ${clean}: ${error}`);
248
249
  return undefined;
249
250
  }
250
251
  }
@@ -5,6 +5,7 @@ import type { PacketData } from 'appium-ios-tuntap';
5
5
  import { EventEmitter } from 'events';
6
6
  import type { ServiceConnection } from '../service-connection.js';
7
7
  import type { BaseService, Service } from '../services/ios/base-service.js';
8
+ import type { InterfaceOrientation } from '../services/ios/springboard-service/index.js';
8
9
  import type { RemoteXpcConnection } from './remote-xpc/remote-xpc-connection.js';
9
10
  import type { Device } from './usbmux/index.js';
10
11
  /**
@@ -430,4 +431,103 @@ export interface MobileImageMounterServiceWithConnection {
430
431
  /** The RemoteXPC connection for service management */
431
432
  remoteXPC: RemoteXpcConnection;
432
433
  }
434
+ /**
435
+ * Represents the instance side of SpringboardService
436
+ */
437
+ export interface SpringboardService extends BaseService {
438
+ /**
439
+ * Gets the icon state
440
+ * @returns Promise resolving to the icon state
441
+ * e.g.
442
+ * [
443
+ * {
444
+ * displayIdentifier: 'com.apple.MobileSMS',
445
+ * displayName: 'Messages',
446
+ * iconModDate: 2025-09-03T12:55:46.400Z,
447
+ * bundleVersion: '1402.700.63.2.1',
448
+ * bundleIdentifier: 'com.apple.MobileSMS'
449
+ * },
450
+ * {
451
+ * displayIdentifier: 'com.apple.measure',
452
+ * displayName: 'Measure',
453
+ * iconModDate: 2025-09-03T12:55:49.522Z,
454
+ * bundleVersion: '175.100.3.0.1',
455
+ * bundleIdentifier: 'com.apple.measure'
456
+ * },
457
+ * ...
458
+ * ]
459
+ */
460
+ getIconState(): Promise<PlistDictionary>;
461
+ /**
462
+ * TODO: This does not work currently due to a bug in Apple protocol implementation (maybe?)
463
+ * Sets the icon state
464
+ * @param newState where is the payload from getIconState
465
+ */
466
+ setIconState(newState: PlistDictionary[]): Promise<void>;
467
+ /**
468
+ * Gets the icon PNG data for a given bundle ID
469
+ * @param bundleID The bundle ID of the app
470
+ * @returns {Promise<Buffer>} which is the PNG data of the app icon
471
+ */
472
+ getIconPNGData(bundleID: string): Promise<Buffer>;
473
+ /**
474
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
475
+ * Add payload structure when it is fixed
476
+ * Gets wallpaper info
477
+ * @param wallpaperName The name of the wallpaper
478
+ * @returns Promise resolving to the wallpaper info
479
+ */
480
+ getWallpaperInfo(wallpaperName: string): Promise<PlistDictionary>;
481
+ /**
482
+ * Gets homescreen icon metrics
483
+ * @returns {Promise<PlistDictionary>}
484
+ * e.g.
485
+ * {
486
+ * homeScreenIconHeight: 64,
487
+ * homeScreenIconMaxPages: 15,
488
+ * homeScreenWidth: 414,
489
+ * homeScreenHeight: 896,
490
+ * homeScreenIconDockMaxCount: 4,
491
+ * homeScreenIconFolderMaxPages: 15,
492
+ * homeScreenIconWidth: 64,
493
+ * homeScreenIconRows: 6,
494
+ * homeScreenIconColumns: 4,
495
+ * homeScreenIconFolderColumns: 3,
496
+ * homeScreenIconFolderRows: 3
497
+ * }
498
+ */
499
+ getHomescreenIconMetrics(): Promise<PlistDictionary>;
500
+ /**
501
+ * Gets the current interface orientation
502
+ * @returns {Promise<InterfaceOrientation>}
503
+ * 1 = Portrait
504
+ * 2 = PortraitUpsideDown
505
+ * 3 = Landscape
506
+ * 4 = LandscapeHomeToLeft
507
+ */
508
+ getInterfaceOrientation(): Promise<InterfaceOrientation>;
509
+ /**
510
+ * Gets wallpaper preview image for homescreen and lockscreen
511
+ * @param wallpaperName
512
+ * @returns {Promise<Buffer>} which is a wallpaper preview image
513
+ */
514
+ getWallpaperPreviewImage(wallpaperName: 'homescreen' | 'lockscreen'): Promise<Buffer>;
515
+ /**
516
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
517
+ * Use getWallpaperPreviewImage('homescreen') instead
518
+ * Gets wallpaper PNG data
519
+ * @param wallpaperName
520
+ * @returns {Promise<Buffer>}
521
+ */
522
+ getWallpaperPNGData(wallpaperName: string): Promise<Buffer>;
523
+ }
524
+ /**
525
+ * Represents a SpringboardService instance with its associated RemoteXPC connection
526
+ */
527
+ export interface SpringboardServiceWithConnection {
528
+ /** The SpringboardService instance */
529
+ springboardService: SpringboardService;
530
+ /** The RemoteXPC connection for service management */
531
+ remoteXPC: RemoteXpcConnection;
532
+ }
433
533
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,MAAM,GACN,UAAU,GAC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;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAEzC;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElD;;;;;;OAMG;IACH,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAElE;;;;;;;;;;;;;;;;;OAiBG;IACH,wBAAwB,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAErD;;;;;;;OAOG;IACH,uBAAuB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEzD;;;;OAIG;IACH,wBAAwB,CACtB,aAAa,EAAE,YAAY,GAAG,YAAY,GACzC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;;OAMG;IACH,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,sCAAsC;IACtC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,sDAAsD;IACtD,SAAS,EAAE,mBAAmB,CAAC;CAChC"}
@@ -0,0 +1,39 @@
1
+ import { type PlistDictionary, type SpringboardService as SpringboardInterface } from '../../../lib/types.js';
2
+ import { ServiceConnection } from '../../../service-connection.js';
3
+ import { BaseService } from '../base-service.js';
4
+ declare enum InterfaceOrientation {
5
+ PORTRAIT = 1,// 0 degrees (default)
6
+ PORTRAIT_UPSIDE_DOWN = 2,// 180 degrees
7
+ LANDSCAPE = 3,// 90 degrees clockwise
8
+ LANDSCAPE_HOME_TO_LEFT = 4
9
+ }
10
+ declare class SpringBoardService extends BaseService implements SpringboardInterface {
11
+ static readonly RSD_SERVICE_NAME = "com.apple.springboardservices.shim.remote";
12
+ private _conn;
13
+ constructor(address: [string, number]);
14
+ getIconState(): Promise<PlistDictionary>;
15
+ /**
16
+ * TODO: This does not work currently due to a bug in Apple protocol implementation (maybe?)
17
+ * Uncomment tests when it is fixed
18
+ */
19
+ setIconState(newState?: PlistDictionary[]): Promise<void>;
20
+ getIconPNGData(bundleID: string): Promise<Buffer>;
21
+ /**
22
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
23
+ * Add tests when it is fixed
24
+ */
25
+ getWallpaperInfo(wallpaperName: string): Promise<PlistDictionary>;
26
+ getWallpaperPreviewImage(wallpaperName: 'homescreen' | 'lockscreen'): Promise<Buffer>;
27
+ getHomescreenIconMetrics(): Promise<PlistDictionary>;
28
+ getInterfaceOrientation(): Promise<InterfaceOrientation>;
29
+ /**
30
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
31
+ * Add tests when it is fixed
32
+ */
33
+ getWallpaperPNGData(wallpaperName: string): Promise<Buffer>;
34
+ connectToSpringboardService(): Promise<ServiceConnection>;
35
+ private sendRequestAndReceive;
36
+ private getServiceConfig;
37
+ }
38
+ export { SpringBoardService, InterfaceOrientation };
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/springboard-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,kBAAkB,IAAI,oBAAoB,EAChD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,aAAK,oBAAoB;IACvB,QAAQ,IAAI,CAAE,sBAAsB;IACpC,oBAAoB,IAAI,CAAE,cAAc;IACxC,SAAS,IAAI,CAAE,uBAAuB;IACtC,sBAAsB,IAAI;CAC3B;AAED,cAAM,kBAAmB,SAAQ,WAAY,YAAW,oBAAoB;IAC1E,MAAM,CAAC,QAAQ,CAAC,gBAAgB,+CACc;IAC9C,OAAO,CAAC,KAAK,CAAkC;gBAEnC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAI/B,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC;IAe9C;;;OAGG;IACG,YAAY,CAAC,QAAQ,GAAE,eAAe,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7D,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBvD;;;OAGG;IACG,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAejE,wBAAwB,CAC5B,aAAa,EAAE,YAAY,GAAG,YAAY,GACzC,OAAO,CAAC,MAAM,CAAC;IAkBZ,wBAAwB,IAAI,OAAO,CAAC,eAAe,CAAC;IAgBpD,uBAAuB,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAgB9D;;;OAGG;IACG,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgB3D,2BAA2B,IAAI,OAAO,CAAC,iBAAiB,CAAC;YASjD,qBAAqB;IAWnC,OAAO,CAAC,gBAAgB;CASzB;AAED,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,174 @@
1
+ import {} from '../../../lib/types.js';
2
+ import { ServiceConnection } from '../../../service-connection.js';
3
+ import { BaseService } from '../base-service.js';
4
+ var InterfaceOrientation;
5
+ (function (InterfaceOrientation) {
6
+ InterfaceOrientation[InterfaceOrientation["PORTRAIT"] = 1] = "PORTRAIT";
7
+ InterfaceOrientation[InterfaceOrientation["PORTRAIT_UPSIDE_DOWN"] = 2] = "PORTRAIT_UPSIDE_DOWN";
8
+ InterfaceOrientation[InterfaceOrientation["LANDSCAPE"] = 3] = "LANDSCAPE";
9
+ InterfaceOrientation[InterfaceOrientation["LANDSCAPE_HOME_TO_LEFT"] = 4] = "LANDSCAPE_HOME_TO_LEFT";
10
+ })(InterfaceOrientation || (InterfaceOrientation = {}));
11
+ class SpringBoardService extends BaseService {
12
+ static RSD_SERVICE_NAME = 'com.apple.springboardservices.shim.remote';
13
+ _conn = null;
14
+ constructor(address) {
15
+ super(address);
16
+ }
17
+ async getIconState() {
18
+ try {
19
+ const req = {
20
+ command: 'getIconState',
21
+ formatVersion: '2',
22
+ };
23
+ return await this.sendRequestAndReceive(req);
24
+ }
25
+ catch (error) {
26
+ if (error instanceof Error) {
27
+ throw new Error(`Failed to get Icon state: ${error.message}`);
28
+ }
29
+ throw error;
30
+ }
31
+ }
32
+ /**
33
+ * TODO: This does not work currently due to a bug in Apple protocol implementation (maybe?)
34
+ * Uncomment tests when it is fixed
35
+ */
36
+ async setIconState(newState = []) {
37
+ try {
38
+ const req = {
39
+ command: 'setIconState',
40
+ iconState: newState,
41
+ };
42
+ await this.sendRequestAndReceive(req);
43
+ }
44
+ catch (error) {
45
+ if (error instanceof Error) {
46
+ throw new Error(`Failed to set icon state: ${error.message}`);
47
+ }
48
+ throw error;
49
+ }
50
+ }
51
+ async getIconPNGData(bundleID) {
52
+ try {
53
+ const req = {
54
+ command: 'getIconPNGData',
55
+ bundleId: bundleID,
56
+ };
57
+ const res = await this.sendRequestAndReceive(req);
58
+ return res.pngData;
59
+ }
60
+ catch (error) {
61
+ if (error instanceof Error) {
62
+ throw new Error(`Failed to get Icon PNG data: ${error.message}`);
63
+ }
64
+ throw error;
65
+ }
66
+ }
67
+ /**
68
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
69
+ * Add tests when it is fixed
70
+ */
71
+ async getWallpaperInfo(wallpaperName) {
72
+ try {
73
+ const req = {
74
+ command: 'getWallpaperInfo',
75
+ wallpaperName,
76
+ };
77
+ return await this.sendRequestAndReceive(req);
78
+ }
79
+ catch (error) {
80
+ if (error instanceof Error) {
81
+ throw new Error(`Failed to get wallpaper info: ${error.message}`);
82
+ }
83
+ throw error;
84
+ }
85
+ }
86
+ async getWallpaperPreviewImage(wallpaperName) {
87
+ try {
88
+ const req = {
89
+ command: 'getWallpaperPreviewImage',
90
+ wallpaperName,
91
+ };
92
+ const res = await this.sendRequestAndReceive(req);
93
+ return res.pngData;
94
+ }
95
+ catch (error) {
96
+ if (error instanceof Error) {
97
+ throw new Error(`Failed to get wallpaper preview image: ${error.message}`);
98
+ }
99
+ throw error;
100
+ }
101
+ }
102
+ async getHomescreenIconMetrics() {
103
+ try {
104
+ const req = {
105
+ command: 'getHomeScreenIconMetrics',
106
+ };
107
+ return await this.sendRequestAndReceive(req);
108
+ }
109
+ catch (error) {
110
+ if (error instanceof Error) {
111
+ throw new Error(`Failed to get homescreen icon metrics: ${error.message}`);
112
+ }
113
+ throw error;
114
+ }
115
+ }
116
+ async getInterfaceOrientation() {
117
+ try {
118
+ const req = {
119
+ command: 'getInterfaceOrientation',
120
+ };
121
+ const res = await this.sendRequestAndReceive(req);
122
+ return res.interfaceOrientation;
123
+ }
124
+ catch (error) {
125
+ if (error instanceof Error) {
126
+ throw new Error(`Failed to get interface orientation: ${error.message}`);
127
+ }
128
+ throw error;
129
+ }
130
+ }
131
+ /**
132
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
133
+ * Add tests when it is fixed
134
+ */
135
+ async getWallpaperPNGData(wallpaperName) {
136
+ try {
137
+ const req = {
138
+ command: 'getHomeScreenWallpaperPNGData',
139
+ wallpaperName,
140
+ };
141
+ const res = await this.sendRequestAndReceive(req);
142
+ return res.pngData;
143
+ }
144
+ catch (error) {
145
+ if (error instanceof Error) {
146
+ throw new Error(`Failed to get wallpaper PNG data: ${error.message}`);
147
+ }
148
+ throw error;
149
+ }
150
+ }
151
+ async connectToSpringboardService() {
152
+ if (this._conn) {
153
+ return this._conn;
154
+ }
155
+ const service = this.getServiceConfig();
156
+ this._conn = await this.startLockdownService(service);
157
+ return this._conn;
158
+ }
159
+ async sendRequestAndReceive(request) {
160
+ if (!this._conn) {
161
+ this._conn = await this.connectToSpringboardService();
162
+ }
163
+ // Skip StartService response
164
+ await this._conn.sendAndReceive(request);
165
+ return await this._conn.sendPlistRequest(request);
166
+ }
167
+ getServiceConfig() {
168
+ return {
169
+ serviceName: SpringBoardService.RSD_SERVICE_NAME,
170
+ port: this.address[1].toString(),
171
+ };
172
+ }
173
+ }
174
+ export { SpringBoardService, InterfaceOrientation };
@@ -1,9 +1,10 @@
1
1
  import { RemoteXpcConnection } from './lib/remote-xpc/remote-xpc-connection.js';
2
- import type { DiagnosticsServiceWithConnection, MobileConfigServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, SyslogService as SyslogServiceType } from './lib/types.js';
2
+ import type { DiagnosticsServiceWithConnection, MobileConfigServiceWithConnection, MobileImageMounterServiceWithConnection, NotificationProxyServiceWithConnection, SpringboardServiceWithConnection, SyslogService as SyslogServiceType } from './lib/types.js';
3
3
  export declare function startDiagnosticsService(udid: string): Promise<DiagnosticsServiceWithConnection>;
4
4
  export declare function startNotificationProxyService(udid: string): Promise<NotificationProxyServiceWithConnection>;
5
5
  export declare function startMobileConfigService(udid: string): Promise<MobileConfigServiceWithConnection>;
6
6
  export declare function startMobileImageMounterService(udid: string): Promise<MobileImageMounterServiceWithConnection>;
7
+ export declare function startSpringboardService(udid: string): Promise<SpringboardServiceWithConnection>;
7
8
  export declare function startSyslogService(udid: string): Promise<SyslogServiceType>;
8
9
  export declare function createRemoteXPCConnection(udid: string): Promise<{
9
10
  remoteXPC: RemoteXpcConnection;
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,KAAK,EACV,gCAAgC,EAChC,iCAAiC,EACjC,uCAAuC,EACvC,sCAAsC,EACtC,aAAa,IAAI,iBAAiB,EACnC,MAAM,gBAA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M,GACX,OAAO,CAAC,iBAAiB,CAAC,CAG5B;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,MAAM;;;;;;;;GAO3D"}
@@ -6,6 +6,7 @@ import DiagnosticsService from './services/ios/diagnostic-service/index.js';
6
6
  import { MobileConfigService } from './services/ios/mobile-config/index.js';
7
7
  import MobileImageMounterService from './services/ios/mobile-image-mounter/index.js';
8
8
  import { NotificationProxyService } from './services/ios/notification-proxy/index.js';
9
+ import { SpringBoardService } from './services/ios/springboard-service/index.js';
9
10
  import SyslogService from './services/ios/syslog-service/index.js';
10
11
  const APPIUM_XCUITEST_DRIVER_NAME = 'appium-xcuitest-driver';
11
12
  const TUNNEL_REGISTRY_PORT = 'tunnelRegistryPort';
@@ -53,6 +54,17 @@ export async function startMobileImageMounterService(udid) {
53
54
  ]),
54
55
  };
55
56
  }
57
+ export async function startSpringboardService(udid) {
58
+ const { remoteXPC, tunnelConnection } = await createRemoteXPCConnection(udid);
59
+ const springboardService = remoteXPC.findService(SpringBoardService.RSD_SERVICE_NAME);
60
+ return {
61
+ remoteXPC: remoteXPC,
62
+ springboardService: new SpringBoardService([
63
+ tunnelConnection.host,
64
+ parseInt(springboardService.port, 10),
65
+ ]),
66
+ };
67
+ }
56
68
  export async function startSyslogService(udid) {
57
69
  const { tunnelConnection } = await createRemoteXPCConnection(udid);
58
70
  return new SyslogService([tunnelConnection.host, tunnelConnection.port]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-ios-remotexpc",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "main": "build/src/index.js",
5
5
  "types": "build/src/index.d.ts",
6
6
  "type": "module",
@@ -31,6 +31,7 @@
31
31
  "test:notification": "mocha test/integration/notification-proxy-test.ts --exit --timeout 1m",
32
32
  "test:image-mounter": "mocha test/integration/mobile-image-mounter-test.ts --exit --timeout 1m",
33
33
  "test:mobile-config": "mocha test/integration/mobile-config-test.ts --exit --timeout 1m",
34
+ "test:springboard": "mocha test/integration/springboard-service-test.ts --exit --timeout 1m",
34
35
  "test:unit": "mocha 'test/unit/**/*.ts' --exit --timeout 2m",
35
36
  "test:tunnel-creation": "sudo tsx scripts/test-tunnel-creation.ts",
36
37
  "test:tunnel-creation:lsof": "sudo tsx scripts/test-tunnel-creation.ts --keep-open"
package/src/index.ts CHANGED
@@ -17,6 +17,7 @@ export type {
17
17
  MobileImageMounterService,
18
18
  NotificationProxyService,
19
19
  MobileConfigService,
20
+ SpringboardService,
20
21
  SyslogService,
21
22
  SocketInfo,
22
23
  TunnelResult,
@@ -26,6 +27,7 @@ export type {
26
27
  MobileImageMounterServiceWithConnection,
27
28
  NotificationProxyServiceWithConnection,
28
29
  MobileConfigServiceWithConnection,
30
+ SpringboardServiceWithConnection,
29
31
  } from './lib/types.js';
30
32
  export {
31
33
  createUsbmux,
@@ -1,6 +1,6 @@
1
1
  import { logger } from '@appium/support';
2
2
  import { type ChildProcess, spawn } from 'node:child_process';
3
- import { resolve4 } from 'node:dns/promises';
3
+ import { lookup } from 'node:dns/promises';
4
4
  import { EventEmitter } from 'node:events';
5
5
  import { clearTimeout, setTimeout } from 'node:timers';
6
6
  import { setTimeout as delay } from 'node:timers/promises';
@@ -173,10 +173,19 @@ async function waitForProcessResult<T>(
173
173
 
174
174
  try {
175
175
  const handlerResult = outputHandler(output);
176
- if (handlerResult === true) {
177
- result = undefined;
178
- } else if (handlerResult) {
179
- result = handlerResult as T;
176
+ if (handlerResult) {
177
+ try {
178
+ process.kill('SIGTERM');
179
+ } catch {}
180
+ clearTimeout(timeout);
181
+ isResolved = true;
182
+ if (handlerResult === true) {
183
+ resolve({ success: true });
184
+ } else {
185
+ result = handlerResult as T;
186
+ resolve({ success: true, data: result });
187
+ }
188
+ return;
180
189
  }
181
190
  } catch (error) {
182
191
  hasError = true;
@@ -345,29 +354,15 @@ function shouldSkipLine(line: string): boolean {
345
354
  async function resolveIPAddress(
346
355
  hostname: string,
347
356
  ): Promise<string[] | undefined> {
357
+ const clean = hostname.endsWith('.') ? hostname.slice(0, -1) : hostname;
348
358
  try {
349
- const address = await resolve4(hostname);
350
- log.info(`[ServiceResolver] Resolved ${hostname} to IPv4: ${address}`);
351
- return address;
359
+ const results = await lookup(clean, { family: 4, all: true });
360
+ const list = Array.isArray(results) ? results : [results];
361
+ const addresses = list.map((r) => r.address);
362
+ log.info(`[ServiceResolver] Resolved ${clean} to IPv4: ${addresses}`);
363
+ return addresses;
352
364
  } catch (error) {
353
- log.warn(
354
- `[ServiceResolver] Failed to resolve hostname ${hostname} to IPv4: ${error}`,
355
- );
356
- // For .local hostnames, try without the trailing dot
357
- if (hostname.endsWith('.local.')) {
358
- const cleanHostname = hostname.slice(0, -1); // Remove trailing dot
359
- try {
360
- const address = await resolve4(cleanHostname);
361
- log.info(
362
- `[ServiceResolver] Resolved ${cleanHostname} to IPv4: ${address}`,
363
- );
364
- return address;
365
- } catch (retryError) {
366
- log.warn(
367
- `[ServiceResolver] Failed to resolve ${cleanHostname} to IPv4: ${retryError}`,
368
- );
369
- }
370
- }
365
+ log.debug(`[ServiceResolver] IPv4 lookup failed for ${clean}: ${error}`);
371
366
  return undefined;
372
367
  }
373
368
  }
package/src/lib/types.ts CHANGED
@@ -6,6 +6,7 @@ import { EventEmitter } from 'events';
6
6
 
7
7
  import type { ServiceConnection } from '../service-connection.js';
8
8
  import type { BaseService, Service } from '../services/ios/base-service.js';
9
+ import type { InterfaceOrientation } from '../services/ios/springboard-service/index.js';
9
10
  import type { RemoteXpcConnection } from './remote-xpc/remote-xpc-connection.js';
10
11
  import type { Device } from './usbmux/index.js';
11
12
 
@@ -508,3 +509,113 @@ export interface MobileImageMounterServiceWithConnection {
508
509
  /** The RemoteXPC connection for service management */
509
510
  remoteXPC: RemoteXpcConnection;
510
511
  }
512
+
513
+ /**
514
+ * Represents the instance side of SpringboardService
515
+ */
516
+ export interface SpringboardService extends BaseService {
517
+ /**
518
+ * Gets the icon state
519
+ * @returns Promise resolving to the icon state
520
+ * e.g.
521
+ * [
522
+ * {
523
+ * displayIdentifier: 'com.apple.MobileSMS',
524
+ * displayName: 'Messages',
525
+ * iconModDate: 2025-09-03T12:55:46.400Z,
526
+ * bundleVersion: '1402.700.63.2.1',
527
+ * bundleIdentifier: 'com.apple.MobileSMS'
528
+ * },
529
+ * {
530
+ * displayIdentifier: 'com.apple.measure',
531
+ * displayName: 'Measure',
532
+ * iconModDate: 2025-09-03T12:55:49.522Z,
533
+ * bundleVersion: '175.100.3.0.1',
534
+ * bundleIdentifier: 'com.apple.measure'
535
+ * },
536
+ * ...
537
+ * ]
538
+ */
539
+ getIconState(): Promise<PlistDictionary>;
540
+
541
+ /**
542
+ * TODO: This does not work currently due to a bug in Apple protocol implementation (maybe?)
543
+ * Sets the icon state
544
+ * @param newState where is the payload from getIconState
545
+ */
546
+ setIconState(newState: PlistDictionary[]): Promise<void>;
547
+
548
+ /**
549
+ * Gets the icon PNG data for a given bundle ID
550
+ * @param bundleID The bundle ID of the app
551
+ * @returns {Promise<Buffer>} which is the PNG data of the app icon
552
+ */
553
+ getIconPNGData(bundleID: string): Promise<Buffer>;
554
+
555
+ /**
556
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
557
+ * Add payload structure when it is fixed
558
+ * Gets wallpaper info
559
+ * @param wallpaperName The name of the wallpaper
560
+ * @returns Promise resolving to the wallpaper info
561
+ */
562
+ getWallpaperInfo(wallpaperName: string): Promise<PlistDictionary>;
563
+
564
+ /**
565
+ * Gets homescreen icon metrics
566
+ * @returns {Promise<PlistDictionary>}
567
+ * e.g.
568
+ * {
569
+ * homeScreenIconHeight: 64,
570
+ * homeScreenIconMaxPages: 15,
571
+ * homeScreenWidth: 414,
572
+ * homeScreenHeight: 896,
573
+ * homeScreenIconDockMaxCount: 4,
574
+ * homeScreenIconFolderMaxPages: 15,
575
+ * homeScreenIconWidth: 64,
576
+ * homeScreenIconRows: 6,
577
+ * homeScreenIconColumns: 4,
578
+ * homeScreenIconFolderColumns: 3,
579
+ * homeScreenIconFolderRows: 3
580
+ * }
581
+ */
582
+ getHomescreenIconMetrics(): Promise<PlistDictionary>;
583
+
584
+ /**
585
+ * Gets the current interface orientation
586
+ * @returns {Promise<InterfaceOrientation>}
587
+ * 1 = Portrait
588
+ * 2 = PortraitUpsideDown
589
+ * 3 = Landscape
590
+ * 4 = LandscapeHomeToLeft
591
+ */
592
+ getInterfaceOrientation(): Promise<InterfaceOrientation>;
593
+
594
+ /**
595
+ * Gets wallpaper preview image for homescreen and lockscreen
596
+ * @param wallpaperName
597
+ * @returns {Promise<Buffer>} which is a wallpaper preview image
598
+ */
599
+ getWallpaperPreviewImage(
600
+ wallpaperName: 'homescreen' | 'lockscreen',
601
+ ): Promise<Buffer>;
602
+
603
+ /**
604
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
605
+ * Use getWallpaperPreviewImage('homescreen') instead
606
+ * Gets wallpaper PNG data
607
+ * @param wallpaperName
608
+ * @returns {Promise<Buffer>}
609
+ */
610
+ getWallpaperPNGData(wallpaperName: string): Promise<Buffer>;
611
+ }
612
+
613
+ /**
614
+ * Represents a SpringboardService instance with its associated RemoteXPC connection
615
+ */
616
+ export interface SpringboardServiceWithConnection {
617
+ /** The SpringboardService instance */
618
+ springboardService: SpringboardService;
619
+ /** The RemoteXPC connection for service management */
620
+ remoteXPC: RemoteXpcConnection;
621
+ }
@@ -0,0 +1,197 @@
1
+ import {
2
+ type PlistDictionary,
3
+ type SpringboardService as SpringboardInterface,
4
+ } from '../../../lib/types.js';
5
+ import { ServiceConnection } from '../../../service-connection.js';
6
+ import { BaseService } from '../base-service.js';
7
+
8
+ enum InterfaceOrientation {
9
+ PORTRAIT = 1, // 0 degrees (default)
10
+ PORTRAIT_UPSIDE_DOWN = 2, // 180 degrees
11
+ LANDSCAPE = 3, // 90 degrees clockwise
12
+ LANDSCAPE_HOME_TO_LEFT = 4, // 270 degrees clockwise
13
+ }
14
+
15
+ class SpringBoardService extends BaseService implements SpringboardInterface {
16
+ static readonly RSD_SERVICE_NAME =
17
+ 'com.apple.springboardservices.shim.remote';
18
+ private _conn: ServiceConnection | null = null;
19
+
20
+ constructor(address: [string, number]) {
21
+ super(address);
22
+ }
23
+
24
+ async getIconState(): Promise<PlistDictionary> {
25
+ try {
26
+ const req = {
27
+ command: 'getIconState',
28
+ formatVersion: '2',
29
+ };
30
+ return await this.sendRequestAndReceive(req);
31
+ } catch (error) {
32
+ if (error instanceof Error) {
33
+ throw new Error(`Failed to get Icon state: ${error.message}`);
34
+ }
35
+ throw error;
36
+ }
37
+ }
38
+
39
+ /**
40
+ * TODO: This does not work currently due to a bug in Apple protocol implementation (maybe?)
41
+ * Uncomment tests when it is fixed
42
+ */
43
+ async setIconState(newState: PlistDictionary[] = []): Promise<void> {
44
+ try {
45
+ const req = {
46
+ command: 'setIconState',
47
+ iconState: newState,
48
+ };
49
+
50
+ await this.sendRequestAndReceive(req);
51
+ } catch (error) {
52
+ if (error instanceof Error) {
53
+ throw new Error(`Failed to set icon state: ${error.message}`);
54
+ }
55
+ throw error;
56
+ }
57
+ }
58
+
59
+ async getIconPNGData(bundleID: string): Promise<Buffer> {
60
+ try {
61
+ const req = {
62
+ command: 'getIconPNGData',
63
+ bundleId: bundleID,
64
+ };
65
+ const res = await this.sendRequestAndReceive(req);
66
+ return res.pngData as Buffer;
67
+ } catch (error) {
68
+ if (error instanceof Error) {
69
+ throw new Error(`Failed to get Icon PNG data: ${error.message}`);
70
+ }
71
+ throw error;
72
+ }
73
+ }
74
+
75
+ /**
76
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
77
+ * Add tests when it is fixed
78
+ */
79
+ async getWallpaperInfo(wallpaperName: string): Promise<PlistDictionary> {
80
+ try {
81
+ const req = {
82
+ command: 'getWallpaperInfo',
83
+ wallpaperName,
84
+ };
85
+ return await this.sendRequestAndReceive(req);
86
+ } catch (error) {
87
+ if (error instanceof Error) {
88
+ throw new Error(`Failed to get wallpaper info: ${error.message}`);
89
+ }
90
+ throw error;
91
+ }
92
+ }
93
+
94
+ async getWallpaperPreviewImage(
95
+ wallpaperName: 'homescreen' | 'lockscreen',
96
+ ): Promise<Buffer> {
97
+ try {
98
+ const req = {
99
+ command: 'getWallpaperPreviewImage',
100
+ wallpaperName,
101
+ };
102
+ const res = await this.sendRequestAndReceive(req);
103
+ return res.pngData as Buffer;
104
+ } catch (error) {
105
+ if (error instanceof Error) {
106
+ throw new Error(
107
+ `Failed to get wallpaper preview image: ${error.message}`,
108
+ );
109
+ }
110
+ throw error;
111
+ }
112
+ }
113
+
114
+ async getHomescreenIconMetrics(): Promise<PlistDictionary> {
115
+ try {
116
+ const req = {
117
+ command: 'getHomeScreenIconMetrics',
118
+ };
119
+ return await this.sendRequestAndReceive(req);
120
+ } catch (error) {
121
+ if (error instanceof Error) {
122
+ throw new Error(
123
+ `Failed to get homescreen icon metrics: ${error.message}`,
124
+ );
125
+ }
126
+ throw error;
127
+ }
128
+ }
129
+
130
+ async getInterfaceOrientation(): Promise<InterfaceOrientation> {
131
+ try {
132
+ const req = {
133
+ command: 'getInterfaceOrientation',
134
+ };
135
+ const res = await this.sendRequestAndReceive(req);
136
+ return res.interfaceOrientation as InterfaceOrientation;
137
+ } catch (error) {
138
+ if (error instanceof Error) {
139
+ throw new Error(
140
+ `Failed to get interface orientation: ${error.message}`,
141
+ );
142
+ }
143
+ throw error;
144
+ }
145
+ }
146
+ /**
147
+ * TODO: This does not work currently due to a bug in Apple protocol implementation
148
+ * Add tests when it is fixed
149
+ */
150
+ async getWallpaperPNGData(wallpaperName: string): Promise<Buffer> {
151
+ try {
152
+ const req = {
153
+ command: 'getHomeScreenWallpaperPNGData',
154
+ wallpaperName,
155
+ };
156
+ const res = await this.sendRequestAndReceive(req);
157
+ return res.pngData as Buffer;
158
+ } catch (error) {
159
+ if (error instanceof Error) {
160
+ throw new Error(`Failed to get wallpaper PNG data: ${error.message}`);
161
+ }
162
+ throw error;
163
+ }
164
+ }
165
+
166
+ async connectToSpringboardService(): Promise<ServiceConnection> {
167
+ if (this._conn) {
168
+ return this._conn;
169
+ }
170
+ const service = this.getServiceConfig();
171
+ this._conn = await this.startLockdownService(service);
172
+ return this._conn;
173
+ }
174
+
175
+ private async sendRequestAndReceive(
176
+ request: PlistDictionary,
177
+ ): Promise<PlistDictionary> {
178
+ if (!this._conn) {
179
+ this._conn = await this.connectToSpringboardService();
180
+ }
181
+ // Skip StartService response
182
+ await this._conn.sendAndReceive(request);
183
+ return await this._conn.sendPlistRequest(request);
184
+ }
185
+
186
+ private getServiceConfig(): {
187
+ serviceName: string;
188
+ port: string;
189
+ } {
190
+ return {
191
+ serviceName: SpringBoardService.RSD_SERVICE_NAME,
192
+ port: this.address[1].toString(),
193
+ };
194
+ }
195
+ }
196
+
197
+ export { SpringBoardService, InterfaceOrientation };
package/src/services.ts CHANGED
@@ -8,12 +8,14 @@ import type {
8
8
  MobileConfigServiceWithConnection,
9
9
  MobileImageMounterServiceWithConnection,
10
10
  NotificationProxyServiceWithConnection,
11
+ SpringboardServiceWithConnection,
11
12
  SyslogService as SyslogServiceType,
12
13
  } from './lib/types.js';
13
14
  import DiagnosticsService from './services/ios/diagnostic-service/index.js';
14
15
  import { MobileConfigService } from './services/ios/mobile-config/index.js';
15
16
  import MobileImageMounterService from './services/ios/mobile-image-mounter/index.js';
16
17
  import { NotificationProxyService } from './services/ios/notification-proxy/index.js';
18
+ import { SpringBoardService } from './services/ios/springboard-service/index.js';
17
19
  import SyslogService from './services/ios/syslog-service/index.js';
18
20
 
19
21
  const APPIUM_XCUITEST_DRIVER_NAME = 'appium-xcuitest-driver';
@@ -82,6 +84,22 @@ export async function startMobileImageMounterService(
82
84
  };
83
85
  }
84
86
 
87
+ export async function startSpringboardService(
88
+ udid: string,
89
+ ): Promise<SpringboardServiceWithConnection> {
90
+ const { remoteXPC, tunnelConnection } = await createRemoteXPCConnection(udid);
91
+ const springboardService = remoteXPC.findService(
92
+ SpringBoardService.RSD_SERVICE_NAME,
93
+ );
94
+ return {
95
+ remoteXPC: remoteXPC as RemoteXpcConnection,
96
+ springboardService: new SpringBoardService([
97
+ tunnelConnection.host,
98
+ parseInt(springboardService.port, 10),
99
+ ]),
100
+ };
101
+ }
102
+
85
103
  export async function startSyslogService(
86
104
  udid: string,
87
105
  ): Promise<SyslogServiceType> {