MCPcopy Create free account
hub / github.com/callstack/agent-device / detectIosAppMetadata

Function detectIosAppMetadata

src/daemon/artifact-materialization.ts:169–181  ·  view source on GitHub ↗
(
  installablePath: string,
)

Source from the content-addressed store, hash-verified

167}
168
169async function detectIosAppMetadata(
170 installablePath: string,
171): Promise<MaterializedArtifact['detected']> {
172 const bundleId = await readIosPlistValue(installablePath, 'CFBundleIdentifier');
173 const displayName = await readIosPlistValue(installablePath, 'CFBundleDisplayName');
174 const bundleName = await readIosPlistValue(installablePath, 'CFBundleName');
175 const appName = displayName ?? bundleName ?? readBaseNameIfMeaningful(installablePath, '.app');
176
177 return {
178 ...(bundleId ? { bundleId } : {}),
179 ...(appName ? { appName } : {}),
180 };
181}
182
183async function readIosPlistValue(appBundlePath: string, key: string): Promise<string | undefined> {
184 const infoPlistPath = path.join(appBundlePath, 'Info.plist');

Callers 1

resolveIosArtifactFunction · 0.85

Calls 2

readIosPlistValueFunction · 0.85
readBaseNameIfMeaningfulFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…