samples/cordova/video_chat/platforms/ios/cordova/lib/prepare.js
function cleanLaunchStoryboardImages(projectRoot, projectConfig, locations) {
    var splashScreens = projectConfig.getSplashScreens('ios');
    var platformProjDir = locations.xcodeCordovaProj;
    var launchStoryboardImagesDir = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
    if (launchStoryboardImagesDir) {
        var resourceMap = mapLaunchStoryboardResources(splashScreens, launchStoryboardImagesDir);
        var contentsJSON = getLaunchStoryboardContentsJSON(splashScreens, launchStoryboardImagesDir);

        Object.keys(resourceMap).forEach(function (targetPath) {
            resourceMap[targetPath] = null;
        });
        events.emit('verbose', 'Cleaning storyboard image set at ' + launchStoryboardImagesDir);

        // Source paths are removed from the map, so updatePaths() will delete the target files.
        FileUpdater.updatePaths(
            resourceMap, { rootDir: projectRoot, all: true }, logFileOp);

        // delete filename from contents.json
        contentsJSON.images.forEach(function(image) {
            image.filename = undefined;
        });

        events.emit('verbose', 'Updating Storyboard image set contents.json');
        fs.writeFileSync(path.join(launchStoryboardImagesDir, 'contents.json'),
                        JSON.stringify(contentsJSON, null, 2));
    }
}
function cleanLaunchStoryboardImages(projectRoot, projectConfig, locations) {
    var splashScreens = projectConfig.getSplashScreens('ios');
    var platformProjDir = locations.xcodeCordovaProj;
    var launchStoryboardImagesDir = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
    if (launchStoryboardImagesDir) {
        var resourceMap = mapLaunchStoryboardResources(splashScreens, launchStoryboardImagesDir);
        var contentsJSON = getLaunchStoryboardContentsJSON(splashScreens, launchStoryboardImagesDir);

        Object.keys(resourceMap).forEach(function (targetPath) {
            resourceMap[targetPath] = null;
        });
        events.emit('verbose', 'Cleaning storyboard image set at ' + launchStoryboardImagesDir);

        // Source paths are removed from the map, so updatePaths() will delete the target files.
        FileUpdater.updatePaths(
            resourceMap, { rootDir: projectRoot, all: true }, logFileOp);

        // delete filename from contents.json
        contentsJSON.images.forEach(function(image) {
            image.filename = undefined;
        });

        events.emit('verbose', 'Updating Storyboard image set contents.json');
        fs.writeFileSync(path.join(launchStoryboardImagesDir, 'contents.json'),
                        JSON.stringify(contentsJSON, null, 2));
    }
}
function cleanLaunchStoryboardImages ( projectRoot , projectConfig , locations ) { var splashScreens = projectConfig . getSplashScreens ( 'ios' ) ; var platformProjDir = locations . xcodeCordovaProj ; var launchStoryboardImagesDir = getLaunchStoryboardImagesDir ( projectRoot , platformProjDir ) ; if ( launchStoryboardImagesDir ) { var resourceMap = mapLaunchStoryboardResources ( splashScreens , launchStoryboardImagesDir ) ; var contentsJSON = getLaunchStoryboardContentsJSON ( splashScreens , launchStoryboardImagesDir ) ; Object . keys ( resourceMap ) . forEach ( function ( targetPath ) { resourceMap [ targetPath ] = null ; } ) ; events . emit ( 'verbose' , 'Cleaning storyboard image set at ' + launchStoryboardImagesDir ) ; // Source paths are removed from the map, so updatePaths() will delete the target files. FileUpdater . updatePaths ( resourceMap , { rootDir : projectRoot , all : true } , logFileOp ) ; // delete filename from contents.json contentsJSON . images . forEach ( function ( image ) { image . filename = undefined ; } ) ; events . emit ( 'verbose' , 'Updating Storyboard image set contents.json' ) ; fs . writeFileSync ( path . join ( launchStoryboardImagesDir , 'contents.json' ) , JSON . stringify ( contentsJSON , null , 2 ) ) ; } }
Removes the images from the launch storyboard's image set and updates the image set's contents.json
file appropriately.

@param  {string} projectRoot        Path to the project root
@param  {Object} projectConfig      The project's config.xml
@param  {Object} locations          A dictionary containing useful location paths
Removes the images from the launch storyboard s image set and updates the image set s contents . json file appropriately .