MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readBundleIdentifier

Function readBundleIdentifier

apps/cli/src/service.ts:232–241  ·  view source on GitHub ↗
(appBundlePath: string)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

xmlUnescapeFunction · 0.85

Tested by

no test coverage detected