| 94 | } |
| 95 | |
| 96 | export async function installProviderDeviceApp( |
| 97 | device: DeviceInfo, |
| 98 | app: string, |
| 99 | appPath: string, |
| 100 | options?: ProviderDeviceInstallOptions, |
| 101 | ): Promise<ProviderDeviceInstallResult | undefined> { |
| 102 | for (const runtime of getActiveProviderDeviceRuntimes()) { |
| 103 | if (!runtime.ownsDevice(device)) continue; |
| 104 | if (!runtime.installApp) { |
| 105 | throw unsupportedProviderOperation(runtime, device, 'install'); |
| 106 | } |
| 107 | const result = await runtime.installApp?.(device, app, appPath, options); |
| 108 | if (result) return result; |
| 109 | throw unsupportedProviderOperation(runtime, device, 'install'); |
| 110 | } |
| 111 | return undefined; |
| 112 | } |
| 113 | |
| 114 | export async function installProviderDeviceInstallablePath( |
| 115 | device: DeviceInfo, |