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

Function resolvePlugin

cli/src/ios/common.ts:78–99  ·  view source on GitHub ↗
(plugin: Plugin)

Source from the content-addressed store, hash-verified

76}
77
78export async function resolvePlugin(plugin: Plugin): Promise<Plugin | null> {
79 const platform = 'ios';
80 if (plugin.manifest?.ios) {
81 plugin.ios = {
82 name: plugin.name,
83 type: PluginType.Core,
84 path: plugin.manifest.ios.src ?? platform,
85 };
86 } else if (plugin.xml) {
87 plugin.ios = {
88 name: plugin.name,
89 type: PluginType.Cordova,
90 path: 'src/' + platform,
91 };
92 if (getIncompatibleCordovaPlugins(platform).includes(plugin.id) || !getPluginPlatform(plugin, platform)) {
93 plugin.ios.type = PluginType.Incompatible;
94 }
95 } else {
96 return null;
97 }
98 return plugin;
99}
100
101/**
102 * Update the native project files with the desired app id and app name

Callers 1

getIOSPluginsFunction · 0.70

Calls 2

getPluginPlatformFunction · 0.90

Tested by

no test coverage detected