( appBundleId: string, executableName?: string | undefined, )
| 34 | let cachedSupportedIosDeviceConsoleCapture: IosDeviceConsoleCaptureSupport | undefined; |
| 35 | |
| 36 | export function buildAppleLogPredicate( |
| 37 | appBundleId: string, |
| 38 | executableName?: string | undefined, |
| 39 | ): string { |
| 40 | const escapedBundleId = escapeAppleLogPredicateString(appBundleId); |
| 41 | const clauses = [ |
| 42 | `subsystem == "${escapedBundleId}"`, |
| 43 | // App frameworks/extensions often log through subsystem names prefixed by the app bundle id. |
| 44 | `subsystem CONTAINS "${escapedBundleId}"`, |
| 45 | `processImagePath ENDSWITH[c] "/${escapedBundleId}"`, |
| 46 | `senderImagePath ENDSWITH[c] "/${escapedBundleId}"`, |
| 47 | ]; |
| 48 | if (executableName) { |
| 49 | const escapedExecutable = escapeAppleLogPredicateString(executableName); |
| 50 | clauses.push( |
| 51 | `process == "${escapedExecutable}"`, |
| 52 | `processImagePath ENDSWITH[c] "/${escapedExecutable}"`, |
| 53 | `senderImagePath ENDSWITH[c] "/${escapedExecutable}"`, |
| 54 | `processImagePath CONTAINS[c] "/${escapedExecutable}.app/"`, |
| 55 | `senderImagePath CONTAINS[c] "/${escapedExecutable}.app/"`, |
| 56 | ); |
| 57 | } |
| 58 | return clauses.join(' OR '); |
| 59 | } |
| 60 | |
| 61 | export function buildIosSimulatorLogStreamArgs(params: { |
| 62 | deviceId: string; |
no test coverage detected