(appBundlePath: string)
| 237 | }; |
| 238 | |
| 239 | const readBundleIdentifier = (appBundlePath: string): string | null => { |
| 240 | try { |
| 241 | const plist = readFileSync(`${appBundlePath}/Contents/Info.plist`, "utf8"); |
| 242 | const match = plist.match(/<key>\s*CFBundleIdentifier\s*<\/key>\s*<string>([^<]*)<\/string>/); |
| 243 | const bundleIdentifier = match ? xmlUnescape(match[1].trim()) : ""; |
| 244 | return bundleIdentifier.length > 0 ? bundleIdentifier : null; |
| 245 | } catch { |
| 246 | return null; |
| 247 | } |
| 248 | }; |
| 249 | |
| 250 | const associatedBundleIdentifier = (programArguments: ReadonlyArray<string>): string | null => { |
| 251 | const executablePath = programArguments[0]; |
no test coverage detected