MCPcopy
hub / github.com/ionic-team/capacitor / checkCapacitorPlatform

Function checkCapacitorPlatform

cli/src/common.ts:73–84  ·  view source on GitHub ↗
(config: Config, platform: string)

Source from the content-addressed store, hash-verified

71}
72
73export async function checkCapacitorPlatform(config: Config, platform: string): Promise<string | null> {
74 const pkg = await getCapacitorPackage(config, platform);
75
76 if (!pkg) {
77 return (
78 `Could not find the ${c.input(platform)} platform.\n` +
79 `You must install it in your project first, e.g. w/ ${c.input(`npm install @capacitor/${platform}`)}`
80 );
81 }
82
83 return null;
84}
85
86export async function checkAppConfig(config: Config): Promise<string | null> {
87 if (!config.app.appId) {

Callers 2

checkAndroidPackageFunction · 0.90
checkIOSPackageFunction · 0.90

Calls 1

getCapacitorPackageFunction · 0.85

Tested by

no test coverage detected