in lib/plugman/pluginHandlers.js [131:158]
uninstall: function (obj, plugin, project, options) {
const src = obj.src;
if (!obj.custom) { // CB-9825 cocoapod integration for plugins
const keepFrameworks = keep_these_frameworks;
if (keepFrameworks.indexOf(src) < 0) {
if (obj.type !== 'podspec') {
// this should be refactored
project.frameworks[src] = project.frameworks[src] || 1;
project.frameworks[src]--;
if (project.frameworks[src] < 1) {
// Only remove non-custom framework from xcode project
// if there is no references remains
project.xcode.removeFramework(src);
delete project.frameworks[src];
}
}
}
return;
}
const targetDir = fixPathSep(path.resolve(project.plugins_dir, plugin.id, path.basename(src)));
const pbxFile = project.xcode.removeFramework(targetDir, { customFramework: true });
if (pbxFile) {
project.xcode.removeFromPbxEmbedFrameworksBuildPhase(pbxFile);
}
fs.rmSync(targetDir, { recursive: true, force: true });
}