appium-ios-remotexpc 5.3.0 → 5.4.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 +6 -0
- package/build/src/index.d.ts +4 -0
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +2 -0
- package/build/src/index.js.map +1 -1
- package/build/src/lib/remote-xpc/constants.d.ts +2 -2
- package/build/src/lib/remote-xpc/constants.d.ts.map +1 -1
- package/build/src/lib/remote-xpc/constants.js +6 -2
- package/build/src/lib/remote-xpc/constants.js.map +1 -1
- package/build/src/services/index.d.ts +2 -1
- package/build/src/services/index.d.ts.map +1 -1
- package/build/src/services/index.js +2 -1
- package/build/src/services/index.js.map +1 -1
- package/build/src/services/ios/app-service/index.d.ts +150 -0
- package/build/src/services/ios/app-service/index.d.ts.map +1 -0
- package/build/src/services/ios/app-service/index.js +151 -0
- package/build/src/services/ios/app-service/index.js.map +1 -0
- package/build/src/services/ios/core-device/core-device-service.d.ts +70 -0
- package/build/src/services/ios/core-device/core-device-service.d.ts.map +1 -0
- package/build/src/services/ios/core-device/core-device-service.js +262 -0
- package/build/src/services/ios/core-device/core-device-service.js.map +1 -0
- package/build/src/services/ios/hid-indigo/index.d.ts +3 -8
- package/build/src/services/ios/hid-indigo/index.d.ts.map +1 -1
- package/build/src/services/ios/hid-indigo/index.js +6 -33
- package/build/src/services/ios/hid-indigo/index.js.map +1 -1
- package/build/src/services.d.ts +8 -0
- package/build/src/services.d.ts.map +1 -1
- package/build/src/services.js +11 -0
- package/build/src/services.js.map +1 -1
- package/package.json +2 -1
- package/src/index.ts +13 -0
- package/src/lib/remote-xpc/constants.ts +6 -2
- package/src/services/index.ts +2 -0
- package/src/services/ios/app-service/index.ts +280 -0
- package/src/services/ios/core-device/core-device-service.ts +368 -0
- package/src/services/ios/hid-indigo/index.ts +6 -46
- package/src/services.ts +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [5.4.0](https://github.com/appium/appium-ios-remotexpc/compare/v5.3.0...v5.4.0) (2026-06-25)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **coredevice:** add coredevice app-service ([#252](https://github.com/appium/appium-ios-remotexpc/issues/252)) ([10e3976](https://github.com/appium/appium-ios-remotexpc/commit/10e397651c48f121f01948257b15bcb171472f3d))
|
|
6
|
+
|
|
1
7
|
## [5.3.0](https://github.com/appium/appium-ios-remotexpc/compare/v5.2.2...v5.3.0) (2026-06-25)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/build/src/index.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ export type { ZipConduitService, ZipConduitProgressCallback, ZipConduitInstallOp
|
|
|
20
20
|
export type { InstallationProxyService } from './services/ios/installation-proxy/index.js';
|
|
21
21
|
export { HID_BUTTON_STATE_CANCELED, HID_BUTTON_STATE_DOWN, HID_BUTTON_STATE_UP, HidIndigoService, } from './services/ios/hid-indigo/index.js';
|
|
22
22
|
export type { HidButtonEventOptions, HidButtonName, HidButtonPressOptions, HidButtonState, } from './services/ios/hid-indigo/index.js';
|
|
23
|
+
export { CoreDeviceError, CoreDeviceService, } from './services/ios/core-device/core-device-service.js';
|
|
24
|
+
export type { CoreDeviceInvokeOptions } from './services/ios/core-device/core-device-service.js';
|
|
25
|
+
export { AppService } from './services/ios/app-service/index.js';
|
|
26
|
+
export type { AppServiceProcessToken, InstalledApp, LaunchApplicationOptions, LaunchedApplication, ListAppsOptions, } from './services/ios/app-service/index.js';
|
|
23
27
|
export type { SyslogEntry, SyslogLabel, SyslogLogLevel, } from './services/ios/syslog-service/syslog-entry-parser.js';
|
|
24
28
|
export type { CrashReportsService, CrashReportsPullOptions, DiagnosticsService, MobileImageMounterService, NotificationProxyService, MobileConfigService, PowerAssertionService, PowerAssertionOptions, SpringboardService, WebInspectorService, MisagentService, SyslogService, HouseArrestService, DVTSecureSocketProxyService, LocationSimulationService, ConditionInducerService, ScreenshotService, GraphicsService, DeviceInfoService, NetworkMonitorService, ProcessInfo, ConditionProfile, ConditionGroup, SocketInfo, TunnelResult, TunnelRegistry, TunnelRegistryEntry, DVTInstruments, NetworkAddress, InterfaceDetectionEvent, ConnectionDetectionEvent, ConnectionUpdateEvent, NetworkEvent, ProcessControlService, ProcessLaunchOptions, OutputReceivedEvent, SendMessageOptions, TestmanagerdService, XCTestServices, SysmontapService, SysmontapOptions, SysmonSample, SysmonProcessInfo, SysmonSystemInfo, } from './lib/types.js';
|
|
25
29
|
export { PowerAssertionType } from './lib/types.js';
|
package/build/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7H,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC3B,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,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,YAAY,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACpE,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,gCAAgC,CAA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B,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EACV,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,aAAa,EACb,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAC1B,CAAC"}
|
package/build/src/index.js
CHANGED
|
@@ -8,6 +8,8 @@ import * as Services from './services.js';
|
|
|
8
8
|
import { startCoreDeviceProxyTcp } from './services/ios/tunnel-service/index.js';
|
|
9
9
|
export { AfcConnectionError } from './services/ios/afc/errors.js';
|
|
10
10
|
export { HID_BUTTON_STATE_CANCELED, HID_BUTTON_STATE_DOWN, HID_BUTTON_STATE_UP, HidIndigoService, } from './services/ios/hid-indigo/index.js';
|
|
11
|
+
export { CoreDeviceError, CoreDeviceService, } from './services/ios/core-device/core-device-service.js';
|
|
12
|
+
export { AppService } from './services/ios/app-service/index.js';
|
|
11
13
|
export { PowerAssertionType } from './lib/types.js';
|
|
12
14
|
export { NetworkMessageType } from './services/ios/dvt/instruments/network-monitor.js';
|
|
13
15
|
export { TunnelAvailabilityError, getTunnelForDevice, } from './lib/tunnel/tunnel-availability.js';
|
package/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAcjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAQlE,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBA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iC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAetE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAC1B,CAAC"}
|
|
@@ -6,8 +6,8 @@ export declare const Http2Constants: {
|
|
|
6
6
|
readonly FLAG_END_HEADERS: 4;
|
|
7
7
|
readonly FLAG_ACK: 1;
|
|
8
8
|
readonly DEFAULT_SETTINGS_MAX_CONCURRENT_STREAMS: 100;
|
|
9
|
-
readonly DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE:
|
|
10
|
-
readonly DEFAULT_WIN_SIZE_INCR:
|
|
9
|
+
readonly DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
|
|
10
|
+
readonly DEFAULT_WIN_SIZE_INCR: number;
|
|
11
11
|
readonly SETTINGS_MAX_CONCURRENT_STREAMS: 3;
|
|
12
12
|
readonly SETTINGS_INITIAL_WINDOW_SIZE: 4;
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote-xpc/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote-xpc/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc;;;;;;;;;;;;CAgBjB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;CAKf,CAAC"}
|
|
@@ -7,8 +7,12 @@ export const Http2Constants = {
|
|
|
7
7
|
FLAG_END_HEADERS: 0x4,
|
|
8
8
|
FLAG_ACK: 0x1,
|
|
9
9
|
DEFAULT_SETTINGS_MAX_CONCURRENT_STREAMS: 100,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// 16 MiB initial receive window. CoreDevice replies (e.g. AppService
|
|
11
|
+
// listapps) arrive on the odd XPC reply channel, which is not replenished
|
|
12
|
+
// with WINDOW_UPDATE frames, so the window must be large enough to hold a
|
|
13
|
+
// full response.
|
|
14
|
+
DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: 16 * 1024 * 1024,
|
|
15
|
+
DEFAULT_WIN_SIZE_INCR: 16 * 1024 * 1024 - 65535,
|
|
12
16
|
SETTINGS_MAX_CONCURRENT_STREAMS: 0x03,
|
|
13
17
|
SETTINGS_INITIAL_WINDOW_SIZE: 0x04,
|
|
14
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/lib/remote-xpc/constants.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,OAAO,CAAC;IACrE,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;IAChB,gBAAgB,EAAE,GAAG;IACrB,QAAQ,EAAE,GAAG;IACb,uCAAuC,EAAE,GAAG;IAC5C,oCAAoC,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/lib/remote-xpc/constants.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,OAAO,CAAC;IACrE,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;IAChB,gBAAgB,EAAE,GAAG;IACrB,QAAQ,EAAE,GAAG;IACb,uCAAuC,EAAE,GAAG;IAC5C,qEAAqE;IACrE,0EAA0E;IAC1E,0EAA0E;IAC1E,iBAAiB;IACjB,oCAAoC,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IACtD,qBAAqB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK;IAC/C,+BAA+B,EAAE,IAAI;IACrC,4BAA4B,EAAE,IAAI;CAC1B,CAAC;AAEX,gBAAgB;AAChB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,wBAAwB,EAAE,UAAU;IACpC,oBAAoB,EAAE,UAAU;IAChC,sBAAsB,EAAE,UAAU;IAClC,uBAAuB,EAAE,UAAU;CAC3B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TunnelRegistryServer, startTunnelRegistryServer } from '../lib/tunnel/tunnel-registry-server.js';
|
|
2
2
|
import * as afc from './ios/afc/index.js';
|
|
3
|
+
import * as appService from './ios/app-service/index.js';
|
|
3
4
|
import * as crashReports from './ios/crash-reports/index.js';
|
|
4
5
|
import * as diagnostics from './ios/diagnostic-service/index.js';
|
|
5
6
|
import * as hidIndigo from './ios/hid-indigo/index.js';
|
|
@@ -10,5 +11,5 @@ import * as powerAssertion from './ios/power-assertion/index.js';
|
|
|
10
11
|
import * as syslog from './ios/syslog-service/index.js';
|
|
11
12
|
import * as tunnel from './ios/tunnel-service/index.js';
|
|
12
13
|
import * as webinspector from './ios/webinspector/index.js';
|
|
13
|
-
export { crashReports, diagnostics, hidIndigo, houseArrest, installationProxy, mobileImageMounter, powerAssertion, syslog, tunnel, afc, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
14
|
+
export { crashReports, diagnostics, hidIndigo, houseArrest, installationProxy, mobileImageMounter, powerAssertion, syslog, tunnel, afc, appService, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,YAAY,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,iBAAiB,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,kBAAkB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,MAAM,EACN,MAAM,EACN,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,YAAY,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,iBAAiB,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,kBAAkB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,MAAM,EACN,MAAM,EACN,GAAG,EACH,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TunnelRegistryServer, startTunnelRegistryServer, } from '../lib/tunnel/tunnel-registry-server.js';
|
|
2
2
|
import * as afc from './ios/afc/index.js';
|
|
3
|
+
import * as appService from './ios/app-service/index.js';
|
|
3
4
|
import * as crashReports from './ios/crash-reports/index.js';
|
|
4
5
|
import * as diagnostics from './ios/diagnostic-service/index.js';
|
|
5
6
|
import * as hidIndigo from './ios/hid-indigo/index.js';
|
|
@@ -10,5 +11,5 @@ import * as powerAssertion from './ios/power-assertion/index.js';
|
|
|
10
11
|
import * as syslog from './ios/syslog-service/index.js';
|
|
11
12
|
import * as tunnel from './ios/tunnel-service/index.js';
|
|
12
13
|
import * as webinspector from './ios/webinspector/index.js';
|
|
13
|
-
export { crashReports, diagnostics, hidIndigo, houseArrest, installationProxy, mobileImageMounter, powerAssertion, syslog, tunnel, afc, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
14
|
+
export { crashReports, diagnostics, hidIndigo, houseArrest, installationProxy, mobileImageMounter, powerAssertion, syslog, tunnel, afc, appService, webinspector, TunnelRegistryServer, startTunnelRegistryServer, };
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,YAAY,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,iBAAiB,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,kBAAkB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,MAAM,EACN,MAAM,EACN,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,YAAY,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,iBAAiB,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,kBAAkB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,MAAM,EACN,MAAM,EACN,GAAG,EACH,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { XPCDictionary } from '../../../lib/types.js';
|
|
2
|
+
import { type CoreDeviceInvokeOptions, CoreDeviceService } from '../core-device/core-device-service.js';
|
|
3
|
+
/** A process as reported by the device (pid + executable location). */
|
|
4
|
+
export interface AppServiceProcessToken {
|
|
5
|
+
processIdentifier: number;
|
|
6
|
+
executableURL?: {
|
|
7
|
+
relative?: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An installed application entry. Only the most commonly used fields are typed;
|
|
14
|
+
* the device returns additional metadata accessible via the index signature.
|
|
15
|
+
*/
|
|
16
|
+
export interface InstalledApp {
|
|
17
|
+
bundleIdentifier?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
path?: string;
|
|
21
|
+
isRemovable?: boolean;
|
|
22
|
+
isInternal?: boolean;
|
|
23
|
+
isHidden?: boolean;
|
|
24
|
+
isAppClip?: boolean;
|
|
25
|
+
isDefault?: boolean;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface ListAppsOptions {
|
|
29
|
+
includeAppClips?: boolean;
|
|
30
|
+
includeRemovableApps?: boolean;
|
|
31
|
+
includeHiddenApps?: boolean;
|
|
32
|
+
includeInternalApps?: boolean;
|
|
33
|
+
includeDefaultApps?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Restrict results to apps the caller has container access to. Required by
|
|
36
|
+
* iOS 26+; defaults to false (list all apps).
|
|
37
|
+
*/
|
|
38
|
+
requireContainerAccess?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Include each app's app-group identifiers in the response. Required key on
|
|
41
|
+
* iOS 26+; defaults to false.
|
|
42
|
+
*/
|
|
43
|
+
includeAppGroupIdentifiers?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Include each app's on-device container paths in the response. Required key
|
|
46
|
+
* on iOS 26+; defaults to false.
|
|
47
|
+
*/
|
|
48
|
+
includeContainerPaths?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Override the default invocation timeout (ms). Recommended on iOS 26+, where
|
|
51
|
+
* the device may not respond to a full app enumeration over this path.
|
|
52
|
+
*/
|
|
53
|
+
timeoutMs?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface LaunchApplicationOptions {
|
|
56
|
+
/** Launch arguments passed to the application. */
|
|
57
|
+
arguments?: string[];
|
|
58
|
+
/** Environment variables to inject. */
|
|
59
|
+
environment?: Record<string, string>;
|
|
60
|
+
/** Start the process suspended (stopped) instead of running. */
|
|
61
|
+
startSuspended?: boolean;
|
|
62
|
+
/** Terminate an already-running instance before launching. Defaults to true. */
|
|
63
|
+
terminateExisting?: boolean;
|
|
64
|
+
/** Extra platform-specific options serialized into a plist. */
|
|
65
|
+
platformSpecificOptions?: Record<string, unknown>;
|
|
66
|
+
/** Override the default invocation timeout. */
|
|
67
|
+
timeoutMs?: number;
|
|
68
|
+
}
|
|
69
|
+
/** Result of launching an application. */
|
|
70
|
+
export interface LaunchedApplication {
|
|
71
|
+
/** The launched process token (pid + executable location). */
|
|
72
|
+
processToken?: AppServiceProcessToken;
|
|
73
|
+
/** Convenience accessor for the launched process id, when available. */
|
|
74
|
+
processIdentifier?: number;
|
|
75
|
+
[key: string]: unknown;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* CoreDevice AppService — manage applications and processes on the device.
|
|
79
|
+
*
|
|
80
|
+
* This is the modern (`devicectl`) backend for app lifecycle on iOS 17+: listing
|
|
81
|
+
* installed apps, launching/terminating apps, enumerating processes, signaling
|
|
82
|
+
* processes and uninstalling apps. Communicates over RemoteXPC via the shared
|
|
83
|
+
* {@link CoreDeviceService} invocation envelope.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* import { constants as osConstants } from 'node:os';
|
|
88
|
+
*
|
|
89
|
+
* const appService = await Services.startAppService(udid);
|
|
90
|
+
* try {
|
|
91
|
+
* const launched = await appService.launchApplication('com.apple.Preferences');
|
|
92
|
+
* await appService.sendSignalToProcess(
|
|
93
|
+
* launched.processIdentifier!,
|
|
94
|
+
* osConstants.signals.SIGKILL,
|
|
95
|
+
* );
|
|
96
|
+
* } finally {
|
|
97
|
+
* await appService.close();
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare class AppService extends CoreDeviceService {
|
|
102
|
+
static readonly RSD_SERVICE_NAME = "com.apple.coredevice.appservice";
|
|
103
|
+
constructor(udid: string);
|
|
104
|
+
/**
|
|
105
|
+
* Lists installed applications. All categories are included by default.
|
|
106
|
+
*
|
|
107
|
+
* ⚠️ Limited on iOS 26+: the device gates app enumeration on this path and
|
|
108
|
+
* does not respond for requests that would return apps whose data containers
|
|
109
|
+
* the caller cannot access (the call hangs until `timeoutMs`). It only returns
|
|
110
|
+
* for result sets needing no container access (typically empty). For reliable
|
|
111
|
+
* app enumeration across iOS versions, prefer
|
|
112
|
+
* {@link InstallationProxyService.browse} (`Services.startInstallationProxyService`).
|
|
113
|
+
* This method remains for parity with the modern `devicectl`-style API and for
|
|
114
|
+
* environments/devices where the privileged context is available.
|
|
115
|
+
*/
|
|
116
|
+
listApps(options?: ListAppsOptions): Promise<InstalledApp[]>;
|
|
117
|
+
/**
|
|
118
|
+
* Launches an application by bundle identifier and returns its process token.
|
|
119
|
+
*
|
|
120
|
+
* Throws a {@link CoreDeviceError} if the bundle id is not installed (the
|
|
121
|
+
* device reports e.g. "The requested application … is not installed.").
|
|
122
|
+
*/
|
|
123
|
+
launchApplication(bundleId: string, options?: LaunchApplicationOptions): Promise<LaunchedApplication>;
|
|
124
|
+
/**
|
|
125
|
+
* Lists the processes currently running on the device.
|
|
126
|
+
*/
|
|
127
|
+
listProcesses(): Promise<AppServiceProcessToken[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Sends a POSIX signal to a process by pid. Use `os.constants.signals` for
|
|
130
|
+
* signal numbers (e.g. `SIGKILL` to terminate, `SIGTERM` to ask politely).
|
|
131
|
+
*
|
|
132
|
+
* Throws a {@link CoreDeviceError} if the pid is not running (the device
|
|
133
|
+
* reports `com.apple.dt.CoreDeviceError`).
|
|
134
|
+
*/
|
|
135
|
+
sendSignalToProcess(pid: number, signal: number): Promise<XPCDictionary>;
|
|
136
|
+
/**
|
|
137
|
+
* Uninstalls an application by bundle identifier. This is idempotent: the
|
|
138
|
+
* device resolves successfully even if the app is not installed.
|
|
139
|
+
*/
|
|
140
|
+
uninstallApp(bundleId: string): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Monitors termination of a process and resolves with its exit status
|
|
143
|
+
* (`{ status: { exitCode, wasCoreDumpCreated } }`). If the pid is not running,
|
|
144
|
+
* the device resolves immediately rather than waiting. Pass `timeoutMs` via
|
|
145
|
+
* `options` to bound how long to wait for a still-running process to exit.
|
|
146
|
+
*/
|
|
147
|
+
monitorProcessTermination(pid: number, options?: CoreDeviceInvokeOptions): Promise<XPCDictionary>;
|
|
148
|
+
}
|
|
149
|
+
export default AppService;
|
|
150
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/app-service/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,uBAAuB,EAC5B,iBAAiB,EAClB,MAAM,uCAAuC,CAAC;AAW/C,uEAAuE;AACvE,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAC9D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,0BAA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EACX,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,CAAC;IASzB;;;OAGG;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD;;;;;OAKG;IACG,yBAAyB,CAC7B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,aAAa,CAAC;CAS1B;AAwBD,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { createPlist } from '../../../lib/plist/index.js';
|
|
2
|
+
import { CoreDeviceService, } from '../core-device/core-device-service.js';
|
|
3
|
+
const FEATURE_LIST_APPS = 'com.apple.coredevice.feature.listapps';
|
|
4
|
+
const FEATURE_LAUNCH_APPLICATION = 'com.apple.coredevice.feature.launchapplication';
|
|
5
|
+
const FEATURE_LIST_PROCESSES = 'com.apple.coredevice.feature.listprocesses';
|
|
6
|
+
const FEATURE_UNINSTALL_APP = 'com.apple.coredevice.feature.uninstallapp';
|
|
7
|
+
const FEATURE_SEND_SIGNAL = 'com.apple.coredevice.feature.sendsignaltoprocess';
|
|
8
|
+
const FEATURE_MONITOR_PROCESS_TERMINATION = 'com.apple.coredevice.feature.monitorprocesstermination';
|
|
9
|
+
/**
|
|
10
|
+
* CoreDevice AppService — manage applications and processes on the device.
|
|
11
|
+
*
|
|
12
|
+
* This is the modern (`devicectl`) backend for app lifecycle on iOS 17+: listing
|
|
13
|
+
* installed apps, launching/terminating apps, enumerating processes, signaling
|
|
14
|
+
* processes and uninstalling apps. Communicates over RemoteXPC via the shared
|
|
15
|
+
* {@link CoreDeviceService} invocation envelope.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { constants as osConstants } from 'node:os';
|
|
20
|
+
*
|
|
21
|
+
* const appService = await Services.startAppService(udid);
|
|
22
|
+
* try {
|
|
23
|
+
* const launched = await appService.launchApplication('com.apple.Preferences');
|
|
24
|
+
* await appService.sendSignalToProcess(
|
|
25
|
+
* launched.processIdentifier!,
|
|
26
|
+
* osConstants.signals.SIGKILL,
|
|
27
|
+
* );
|
|
28
|
+
* } finally {
|
|
29
|
+
* await appService.close();
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export class AppService extends CoreDeviceService {
|
|
34
|
+
static RSD_SERVICE_NAME = 'com.apple.coredevice.appservice';
|
|
35
|
+
constructor(udid) {
|
|
36
|
+
super(udid, AppService.RSD_SERVICE_NAME);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Lists installed applications. All categories are included by default.
|
|
40
|
+
*
|
|
41
|
+
* ⚠️ Limited on iOS 26+: the device gates app enumeration on this path and
|
|
42
|
+
* does not respond for requests that would return apps whose data containers
|
|
43
|
+
* the caller cannot access (the call hangs until `timeoutMs`). It only returns
|
|
44
|
+
* for result sets needing no container access (typically empty). For reliable
|
|
45
|
+
* app enumeration across iOS versions, prefer
|
|
46
|
+
* {@link InstallationProxyService.browse} (`Services.startInstallationProxyService`).
|
|
47
|
+
* This method remains for parity with the modern `devicectl`-style API and for
|
|
48
|
+
* environments/devices where the privileged context is available.
|
|
49
|
+
*/
|
|
50
|
+
async listApps(options = {}) {
|
|
51
|
+
const output = await this.invoke(FEATURE_LIST_APPS, {
|
|
52
|
+
includeAppClips: options.includeAppClips ?? true,
|
|
53
|
+
includeRemovableApps: options.includeRemovableApps ?? true,
|
|
54
|
+
includeHiddenApps: options.includeHiddenApps ?? true,
|
|
55
|
+
includeInternalApps: options.includeInternalApps ?? true,
|
|
56
|
+
includeDefaultApps: options.includeDefaultApps ?? true,
|
|
57
|
+
requireContainerAccess: options.requireContainerAccess ?? false,
|
|
58
|
+
includeAppGroupIdentifiers: options.includeAppGroupIdentifiers ?? false,
|
|
59
|
+
includeContainerPaths: options.includeContainerPaths ?? false,
|
|
60
|
+
}, { timeoutMs: options.timeoutMs });
|
|
61
|
+
return asArray(output);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Launches an application by bundle identifier and returns its process token.
|
|
65
|
+
*
|
|
66
|
+
* Throws a {@link CoreDeviceError} if the bundle id is not installed (the
|
|
67
|
+
* device reports e.g. "The requested application … is not installed.").
|
|
68
|
+
*/
|
|
69
|
+
async launchApplication(bundleId, options = {}) {
|
|
70
|
+
const platformOptions = createPlist((options.platformSpecificOptions ?? {}));
|
|
71
|
+
const platformOptionsBuffer = Buffer.isBuffer(platformOptions)
|
|
72
|
+
? platformOptions
|
|
73
|
+
: Buffer.from(platformOptions, 'utf8');
|
|
74
|
+
const output = asDict(await this.invoke(FEATURE_LAUNCH_APPLICATION, {
|
|
75
|
+
applicationSpecifier: {
|
|
76
|
+
bundleIdentifier: { _0: bundleId },
|
|
77
|
+
},
|
|
78
|
+
options: {
|
|
79
|
+
arguments: options.arguments ?? [],
|
|
80
|
+
environmentVariables: options.environment ?? {},
|
|
81
|
+
standardIOUsesPseudoterminals: true,
|
|
82
|
+
startStopped: options.startSuspended ?? false,
|
|
83
|
+
terminateExisting: options.terminateExisting ?? true,
|
|
84
|
+
user: { shortName: 'mobile' },
|
|
85
|
+
platformSpecificOptions: platformOptionsBuffer,
|
|
86
|
+
},
|
|
87
|
+
standardIOIdentifiers: {},
|
|
88
|
+
}, { timeoutMs: options.timeoutMs }));
|
|
89
|
+
return {
|
|
90
|
+
...output,
|
|
91
|
+
processIdentifier: extractProcessIdentifier(output),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Lists the processes currently running on the device.
|
|
96
|
+
*/
|
|
97
|
+
async listProcesses() {
|
|
98
|
+
const output = asDict(await this.invoke(FEATURE_LIST_PROCESSES));
|
|
99
|
+
return asArray(output.processTokens);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Sends a POSIX signal to a process by pid. Use `os.constants.signals` for
|
|
103
|
+
* signal numbers (e.g. `SIGKILL` to terminate, `SIGTERM` to ask politely).
|
|
104
|
+
*
|
|
105
|
+
* Throws a {@link CoreDeviceError} if the pid is not running (the device
|
|
106
|
+
* reports `com.apple.dt.CoreDeviceError`).
|
|
107
|
+
*/
|
|
108
|
+
async sendSignalToProcess(pid, signal) {
|
|
109
|
+
return asDict(await this.invoke(FEATURE_SEND_SIGNAL, {
|
|
110
|
+
process: { processIdentifier: pid },
|
|
111
|
+
signal,
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Uninstalls an application by bundle identifier. This is idempotent: the
|
|
116
|
+
* device resolves successfully even if the app is not installed.
|
|
117
|
+
*/
|
|
118
|
+
async uninstallApp(bundleId) {
|
|
119
|
+
await this.invoke(FEATURE_UNINSTALL_APP, { bundleIdentifier: bundleId });
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Monitors termination of a process and resolves with its exit status
|
|
123
|
+
* (`{ status: { exitCode, wasCoreDumpCreated } }`). If the pid is not running,
|
|
124
|
+
* the device resolves immediately rather than waiting. Pass `timeoutMs` via
|
|
125
|
+
* `options` to bound how long to wait for a still-running process to exit.
|
|
126
|
+
*/
|
|
127
|
+
async monitorProcessTermination(pid, options = {}) {
|
|
128
|
+
return asDict(await this.invoke(FEATURE_MONITOR_PROCESS_TERMINATION, { processToken: { processIdentifier: pid } }, options));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function asDict(value) {
|
|
132
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
133
|
+
return value;
|
|
134
|
+
}
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
function asArray(value) {
|
|
138
|
+
return Array.isArray(value) ? value : [];
|
|
139
|
+
}
|
|
140
|
+
function extractProcessIdentifier(output) {
|
|
141
|
+
const token = output.processToken;
|
|
142
|
+
if (token && typeof token === 'object' && !Array.isArray(token)) {
|
|
143
|
+
const pid = token.processIdentifier;
|
|
144
|
+
if (typeof pid === 'number') {
|
|
145
|
+
return pid;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
export default AppService;
|
|
151
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/services/ios/app-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAM1D,OAAO,EAEL,iBAAiB,GAClB,MAAM,uCAAuC,CAAC;AAE/C,MAAM,iBAAiB,GAAG,uCAAuC,CAAC;AAClE,MAAM,0BAA0B,GAC9B,gDAAgD,CAAC;AACnD,MAAM,sBAAsB,GAAG,4CAA4C,CAAC;AAC5E,MAAM,qBAAqB,GAAG,2CAA2C,CAAC;AAC1E,MAAM,mBAAmB,GAAG,kDAAkD,CAAC;AAC/E,MAAM,mCAAmC,GACvC,wDAAwD,CAAC;AA8E3D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAC/C,MAAM,CAAU,gBAAgB,GAAG,iCAAiC,CAAC;IAErE,YAAY,IAAY;QACtB,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,QAAQ,CAAC,UAA2B,EAAE;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAC9B,iBAAiB,EACjB;YACE,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,IAAI;YAChD,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,IAAI;YAC1D,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,IAAI,IAAI;YACpD,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,IAAI,IAAI;YACxD,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,IAAI;YACtD,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,IAAI,KAAK;YAC/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MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;IAClC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,MAAM,GAAG,GAAI,KAAuB,CAAC,iBAAiB,CAAC;QACvD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { RemoteXpcFramedTransport } from '../../../lib/remote-xpc/remote-xpc-framed-transport.js';
|
|
2
|
+
import type { XPCDictionary, XPCValue } from '../../../lib/types.js';
|
|
3
|
+
import { BaseService } from '../base-service.js';
|
|
4
|
+
export interface CoreDeviceInvokeOptions {
|
|
5
|
+
/** Optional action identifier for the invocation. */
|
|
6
|
+
actionIdentifier?: string;
|
|
7
|
+
/** Override the default response timeout. */
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Error thrown when a CoreDevice invocation fails or returns no output.
|
|
12
|
+
*/
|
|
13
|
+
export declare class CoreDeviceError extends Error {
|
|
14
|
+
readonly response?: XPCDictionary;
|
|
15
|
+
constructor(message: string, response?: XPCDictionary);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Base class for iOS CoreDevice (`com.apple.coredevice.*`) services.
|
|
19
|
+
*
|
|
20
|
+
* CoreDevice services speak RemoteXPC over the tunnel and wrap every request in
|
|
21
|
+
* a common invocation envelope. This base owns the framed transport lifecycle
|
|
22
|
+
* and exposes:
|
|
23
|
+
* - {@link invoke} for request/response features (the common case)
|
|
24
|
+
* - {@link send} for fire-and-forget messages (e.g. HID events)
|
|
25
|
+
*
|
|
26
|
+
* Subclasses pass their RSD service name to the constructor and typically also
|
|
27
|
+
* expose it via a static `RSD_SERVICE_NAME` for catalog checks.
|
|
28
|
+
*/
|
|
29
|
+
export declare abstract class CoreDeviceService extends BaseService {
|
|
30
|
+
private readonly serviceName;
|
|
31
|
+
protected transport: RemoteXpcFramedTransport | null;
|
|
32
|
+
protected nextMessageId: number;
|
|
33
|
+
/** Serializes invocations so concurrent calls do not interleave replies. */
|
|
34
|
+
private invokeQueue;
|
|
35
|
+
constructor(udid: string, serviceName: string);
|
|
36
|
+
close(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Sends a fire-and-forget XPC message on the root channel. Used by services
|
|
39
|
+
* that do not expect a reply (e.g. HID event streams).
|
|
40
|
+
*/
|
|
41
|
+
protected send(body: XPCDictionary): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Invokes a CoreDevice feature and returns its `CoreDevice.output`.
|
|
44
|
+
*
|
|
45
|
+
* Each invocation uses a fresh connection: CoreDevice services close the
|
|
46
|
+
* connection after a request/response cycle, so reusing a connection
|
|
47
|
+
* across invocations fails. Calls are also serialized, so they never overlap.
|
|
48
|
+
*/
|
|
49
|
+
protected invoke(featureIdentifier?: string, input?: XPCDictionary, options?: CoreDeviceInvokeOptions): Promise<XPCValue>;
|
|
50
|
+
protected createTransport(): Promise<RemoteXpcFramedTransport>;
|
|
51
|
+
protected getTransport(): Promise<RemoteXpcFramedTransport>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a transport and attaches a permanent `'error'` listener. The
|
|
54
|
+
* framed transport is an EventEmitter; an `'error'` emitted with no listener
|
|
55
|
+
* is thrown by Node and crashes the process. `invoke()` registers a per-call
|
|
56
|
+
* listener, but fire-and-forget `send()` does not — so this guarantees a
|
|
57
|
+
* listener always exists for the transport's lifetime.
|
|
58
|
+
*/
|
|
59
|
+
private newTransport;
|
|
60
|
+
/**
|
|
61
|
+
* Closes any existing connection and opens a fresh one. Used by {@link invoke}
|
|
62
|
+
* because CoreDevice services are one-shot per connection.
|
|
63
|
+
*/
|
|
64
|
+
private refreshTransport;
|
|
65
|
+
private invokeInternal;
|
|
66
|
+
private buildEnvelope;
|
|
67
|
+
private waitForResponse;
|
|
68
|
+
}
|
|
69
|
+
export default CoreDeviceService;
|
|
70
|
+
//# sourceMappingURL=core-device-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-device-service.d.ts","sourceRoot":"","sources":["../../../../../src/services/ios/core-device/core-device-service.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAElG,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA6BjD,MAAM,WAAW,uBAAuB;IACtC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;gBAEtB,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa;CAKtD;AAED;;;;;;;;;;;GAWG;AACH,8BAAsB,iBAAkB,SAAQ,WAAW;IACzD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IAErC,SAAS,CAAC,SAAS,EAAE,wBAAwB,GAAG,IAAI,CAAQ;IAC5D,SAAS,CAAC,aAAa,SAAK;IAE5B,4EAA4E;IAC5E,OAAO,CAAC,WAAW,CAAuC;gBAE9C,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAKvC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B;;;OAGG;cACa,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAcxD;;;;;;OAMG;cACa,MAAM,CACpB,iBAAiB,CAAC,EAAE,MAAM,EAC1B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