install: function()

in lib/plugman/pluginHandlers.js [49:68]


        install: function (obj, plugin, project, options) {
            const src = obj.src;
            let target = obj.target;
            const srcFile = path.resolve(plugin.dir, src);

            if (!target) {
                target = path.basename(src);
            }
            const destFile = path.resolve(project.resources_dir, target);

            if (!fs.existsSync(srcFile)) {
                throw new CordovaError(`Cannot find resource file "${srcFile}" for plugin ${plugin.id} in iOS platform`);
            }
            if (fs.existsSync(destFile)) {
                throw new CordovaError(`File already exists at destination "${destFile}" for resource file specified by plugin ${plugin.id} in iOS platform`);
            }
            project.xcode.addResourceFile(path.join('Resources', target));
            const link = !!(options && options.link);
            copyFile(plugin.dir, src, project.projectDir, destFile, link);
        },