(appBundlePath: string)
| 226 | }; |
| 227 | |
| 228 | const readBundleIdentifier = (appBundlePath: string): string | null => { |
| 229 | try { |
| 230 | const plist = readFileSync(`${appBundlePath}/Contents/Info.plist`, "utf8"); |
| 231 | const match = plist.match(/<key>\s*CFBundleIdentifier\s*<\/key>\s*<string>([^<]*)<\/string>/); |
| 232 | const bundleIdentifier = match ? xmlUnescape(match[1].trim()) : ""; |
| 233 | return bundleIdentifier.length > 0 ? bundleIdentifier : null; |
| 234 | } catch { |
| 235 | return null; |
| 236 | } |
| 237 | }; |
| 238 | |
| 239 | const associatedBundleIdentifier = (programArguments: ReadonlyArray<string>): string | null => { |
| 240 | const executablePath = programArguments[0]; |
no test coverage detected