removePodSpecs (plugin, podSpecs, uninstallOptions) {
        const { isSwiftPackagePlugin } = require('./SwiftPackage');

        const project_dir = this.locations.root;
        const project_name = this.locations.xcodeCordovaProj.split(path.sep).pop();

        const Podfile = require('./Podfile').Podfile;
        const PodsJson = require('./PodsJson').PodsJson;
        const podsjsonFile = new PodsJson(path.join(project_dir, PodsJson.FILENAME));
        const podfileFile = new Podfile(path.join(project_dir, Podfile.FILENAME), project_name);

        if (podSpecs.length) {
            events.emit('verbose', 'Adding pods since the plugin contained <podspecs>');
            podSpecs.forEach(obj => {
                // declarations
                Object.keys(obj.declarations).forEach(key => {
                    if (obj.declarations[key] === 'true') {
                        const declaration = Podfile.proofDeclaration(key);
                        const podJson = {
                            declaration
                        };
                        const val = podsjsonFile.getDeclaration(declaration);
                        if (val) {
                            podsjsonFile.decrementDeclaration(declaration);
                        } else {
                            const message = util.format('plugin \"%s\" declaration \"%s\" does not seem to be in pods.json, nothing to remove. Will attempt to remove from Podfile.', plugin.id, podJson.declaration); /* eslint no-useless-escape : 0 */
                            events.emit('verbose', message);
                        }
                        if (!val || val.count === 0) {
                            podfileFile.removeDeclaration(podJson.declaration);
                        }
                    }
                });
                // sources
                Object.keys(obj.sources).forEach(key => {
                    const podJson = {
                        source: obj.sources[key].source
                    };
                    const val = podsjsonFile.getSource(key);
                    if (val) {
                        podsjsonFile.decrementSource(key);
                    } else {
                        const message = util.format('plugin \"%s\" source \"%s\" does not seem to be in pods.json, nothing to remove. Will attempt to remove from Podfile.', plugin.id, podJson.source); /* eslint no-useless-escape : 0 */
                        events.emit('verbose', message);
                    }
                    if (!val || val.count === 0) {
                        podfileFile.removeSource(podJson.source);
                    }
                });
                // libraries
                const isSPM = isSwiftPackagePlugin(plugin);
                Object.keys(obj.libraries).forEach(key => {
                    let podJson = Object.assign({}, obj.libraries[key]);
                    if (!isSPM || (isSPM && !_isTrue(podJson.nospm))) {
                        podJson = replacePodSpecVariables(podJson, uninstallOptions);
                        const val = podsjsonFile.getLibrary(key);
                        if (val) {
                            podsjsonFile.decrementLibrary(key);
                        } else {
                            const message = util.format('plugin \"%s\" podspec \"%s\" does not seem to be in pods.json, nothing to remove. Will attempt to remove from Podfile.', plugin.id, podJson.name); /* eslint no-useless-escape : 0 */
                            events.emit('verbose', message);
                        }
                        if (!val || val.count === 0) {
                            podfileFile.removeSpec(podJson.name);
                        }
                    }
                });
            });

            // now that all the pods have been processed, write to pods.json
            podsjsonFile.write();

            if (podfileFile.isDirty()) {
                podfileFile.write();
                events.emit('verbose', 'Running `pod install` (to uninstall pods)');

                return podfileFile.install(check_reqs.check_cocoapods)
                    .then(() => podsjsonFile.setSwiftVersionForCocoaPodsLibraries(this.root));
            } else {
                events.emit('verbose', 'Podfile unchanged, skipping `pod install`');
            }
        }
        return Promise.resolve();
    }
removing CocoaPods libraries

@param  {PluginInfo}  plugin  A PluginInfo instance that represents plugin
  that will be installed.
@param  {Object}  podSpecs: the return value of plugin.getPodSpecs(this.platform)
@return  {Promise}  Return a promise