You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ks...@apache.org on 2016/11/22 22:15:32 UTC

[1/4] ios commit: CB-12130 - Launch storyboard images are not updated or cleaned

Repository: cordova-ios
Updated Branches:
  refs/heads/4.3.x 4d70f5230 -> a675f9387


CB-12130 - Launch storyboard images are not updated or cleaned

The platform project directory needs to be relative to the project

Launch screen images were not updated or cleaned in
`updateLaunchStoryboardImages()` or `cleanLaunchStoryboardImages()`
because the check for `Images.xcassets` in
`getLaunchStoryboardImagesDir()` failed.

The reason was that the `platformProjDir` and `projectRoot` were
joined, while both were relative to the root directory. So the
resulting directory was non-sensical. This changes makes
`platformProjDir` relative to `cordovaProject.root`, which matches the
same check in `updateSplashScreens()` and `updateIcons()`.

 This closes #276

(cherry picked from commit 99219c1c4cd8d1000fb89a15449f2d25a57bef41)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4871643d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/4871643d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/4871643d

Branch: refs/heads/4.3.x
Commit: 4871643d868f3d05fa97a7a4423140e73b48b130
Parents: 4d70f52
Author: Niels Leenheer <ni...@leenheer.nl>
Authored: Thu Nov 10 15:27:43 2016 +0100
Committer: Kerri Shotts <ks...@apache.org>
Committed: Mon Nov 21 15:23:11 2016 -0600

----------------------------------------------------------------------
 bin/templates/scripts/cordova/lib/prepare.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4871643d/bin/templates/scripts/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/prepare.js b/bin/templates/scripts/cordova/lib/prepare.js
index 8d1cda9..02dd457 100644
--- a/bin/templates/scripts/cordova/lib/prepare.js
+++ b/bin/templates/scripts/cordova/lib/prepare.js
@@ -685,7 +685,7 @@ function getLaunchStoryboardImagesDir(projectRoot, platformProjDir) {
  */
 function updateLaunchStoryboardImages(cordovaProject, locations) {
     var splashScreens = cordovaProject.projectConfig.getSplashScreens('ios');
-    var platformProjDir = locations.xcodeCordovaProj;
+    var platformProjDir = path.relative(cordovaProject.root, locations.xcodeCordovaProj);
     var launchStoryboardImagesDir = getLaunchStoryboardImagesDir(cordovaProject.root, platformProjDir);
 
     if (launchStoryboardImagesDir) {
@@ -712,7 +712,7 @@ function updateLaunchStoryboardImages(cordovaProject, locations) {
  */
 function cleanLaunchStoryboardImages(projectRoot, projectConfig, locations) {
     var splashScreens = projectConfig.getSplashScreens('ios');
-    var platformProjDir = locations.xcodeCordovaProj;
+    var platformProjDir = path.relative(projectRoot, locations.xcodeCordovaProj);
     var launchStoryboardImagesDir = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
     if (launchStoryboardImagesDir) {
         var resourceMap = mapLaunchStoryboardResources(splashScreens, launchStoryboardImagesDir);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[3/4] ios commit: CB-12155: Create tests for launch storyboards

Posted by ks...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/prepare.spec.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/prepare.spec.js b/tests/spec/unit/prepare.spec.js
index 00624b0..bf0d303 100644
--- a/tests/spec/unit/prepare.spec.js
+++ b/tests/spec/unit/prepare.spec.js
@@ -56,7 +56,7 @@ function wrapperError(p, done, post) {
     }).fin(done);
 }
 
-describe('prepare', function () {
+describe('prepare', function() {
     var p;
     beforeEach(function() {
         shell.mkdir('-p', iosPlatform);
@@ -68,6 +68,486 @@ describe('prepare', function () {
         shell.rm('-rf', path.join(__dirname, 'some'));
     });
 
+    describe('launch storyboard feature (CB-9762)', function() {
+        function makeSplashScreenEntry(src, width, height) {
+            return {
+                src: src,
+                width: width,
+                height: height
+            };
+        }
+
+        var noLaunchStoryboardImages = [];
+
+        var singleLaunchStoryboardImage = [makeSplashScreenEntry('res/splash/ios/Default@2x~universal~anyany.png')];
+
+        var singleLaunchStoryboardImageWithLegacyLaunchImage = [
+            makeSplashScreenEntry('res/splash/ios/Default@2x~universal~anyany.png'),
+            makeSplashScreenEntry('res/splash/ios/another-image.png', 1024, 768)
+        ];
+
+        var typicalLaunchStoryboardImages = [
+            makeSplashScreenEntry('res/splash/ios/Default@2x~universal~anyany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@2x~universal~comany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@2x~universal~comcom.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@3x~universal~anyany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@3x~universal~anycom.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@3x~universal~comany.png')
+        ];
+
+        var multiDeviceLaunchStoryboardImages = [
+            makeSplashScreenEntry('res/splash/ios/Default@2x~ipad~anyany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@2x~ipad~comany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@2x~ipad~comcom.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@2x~universal~anyany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@2x~universal~comany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@2x~universal~comcom.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@3x~iphone~anyany.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@3x~iphone~anycom.png'),
+            makeSplashScreenEntry('res/splash/ios/Default@3x~iphone~comany.png')
+        ];
+
+        describe('#mapLaunchStoryboardContents', function() {
+            var mapLaunchStoryboardContents = prepare.__get__('mapLaunchStoryboardContents');
+
+            it('should return an array with no mapped storyboard images', function() {
+                var result = mapLaunchStoryboardContents(noLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-map/empty-map'));
+            });
+
+            it('should return an array with one mapped storyboard image', function() {
+                var result = mapLaunchStoryboardContents(singleLaunchStoryboardImage, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-map/single-2xanyany-map'));
+            });
+
+            it('should return an array with one mapped storyboard image, even with legacy images', function() {
+                var result = mapLaunchStoryboardContents(singleLaunchStoryboardImageWithLegacyLaunchImage, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-map/single-2xanyany-map'));
+            });
+
+            it('should return an array with several mapped storyboard images', function() {
+                var result = mapLaunchStoryboardContents(typicalLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-map/typical-universal-map'));
+            });
+
+            it('should return an array with several mapped storyboard images across device classes', function() {
+                var result = mapLaunchStoryboardContents(multiDeviceLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-map/varied-device-map'));
+            });
+        });
+
+        describe('#mapLaunchStoryboardResources', function() {
+            var mapLaunchStoryboardResources = prepare.__get__('mapLaunchStoryboardResources');
+
+            it('should return an empty object with no mapped storyboard images', function () {
+                var result = mapLaunchStoryboardResources(noLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual({});
+            });
+
+            it('should return an object with one mapped storyboard image', function() {
+                var result = mapLaunchStoryboardResources(singleLaunchStoryboardImage, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual({
+                    'Default@2x~universal~anyany.png' : 'res/splash/ios/Default@2x~universal~anyany.png'
+                });
+            });
+
+            it('should return an object with one mapped storyboard image, even with legacy images', function() {
+                var result = mapLaunchStoryboardResources(singleLaunchStoryboardImageWithLegacyLaunchImage, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual({
+                    'Default@2x~universal~anyany.png' : 'res/splash/ios/Default@2x~universal~anyany.png'
+                });
+            });
+
+            it('should return an object with several mapped storyboard images', function() {
+                var result = mapLaunchStoryboardResources(typicalLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual({
+                    'Default@2x~universal~anyany.png' : 'res/splash/ios/Default@2x~universal~anyany.png',
+                    'Default@2x~universal~comany.png' : 'res/splash/ios/Default@2x~universal~comany.png',
+                    'Default@2x~universal~comcom.png' : 'res/splash/ios/Default@2x~universal~comcom.png',
+                    'Default@3x~universal~anyany.png' : 'res/splash/ios/Default@3x~universal~anyany.png',
+                    'Default@3x~universal~anycom.png' : 'res/splash/ios/Default@3x~universal~anycom.png',
+                    'Default@3x~universal~comany.png' : 'res/splash/ios/Default@3x~universal~comany.png'
+                });
+            });
+
+            it('should return an object with several mapped storyboard images across device classes', function() {
+                var result = mapLaunchStoryboardResources(multiDeviceLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual({
+                    'Default@2x~universal~anyany.png' : 'res/splash/ios/Default@2x~universal~anyany.png',
+                    'Default@2x~universal~comany.png' : 'res/splash/ios/Default@2x~universal~comany.png',
+                    'Default@2x~universal~comcom.png' : 'res/splash/ios/Default@2x~universal~comcom.png',
+                    'Default@2x~ipad~anyany.png' : 'res/splash/ios/Default@2x~ipad~anyany.png',
+                    'Default@2x~ipad~comany.png' : 'res/splash/ios/Default@2x~ipad~comany.png',
+                    'Default@2x~ipad~comcom.png' : 'res/splash/ios/Default@2x~ipad~comcom.png',
+                    'Default@3x~iphone~anyany.png' : 'res/splash/ios/Default@3x~iphone~anyany.png',
+                    'Default@3x~iphone~anycom.png' : 'res/splash/ios/Default@3x~iphone~anycom.png',
+                    'Default@3x~iphone~comany.png' : 'res/splash/ios/Default@3x~iphone~comany.png'
+                });
+            });
+        });
+
+        describe('#getLaunchStoryboardContentsJSON', function() {
+            var getLaunchStoryboardContentsJSON = prepare.__get__('getLaunchStoryboardContentsJSON');
+
+            it('should return contents.json with no mapped storyboard images', function () {
+                var result = getLaunchStoryboardContentsJSON(noLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-json/empty'));
+            });
+
+            it('should return contents.json with one mapped storyboard image', function() {
+                var result = getLaunchStoryboardContentsJSON(singleLaunchStoryboardImage, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-json/single-2xanyany'));
+            });
+
+            it('should return contents.json with one mapped storyboard image, even with legacy images', function() {
+                var result = getLaunchStoryboardContentsJSON(singleLaunchStoryboardImageWithLegacyLaunchImage, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-json/single-2xanyany'));
+            });
+
+            it('should return contents.json with several mapped storyboard images', function() {
+                var result = getLaunchStoryboardContentsJSON(typicalLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-json/typical-universal'));
+            });
+
+            it('should return contents.json with several mapped storyboard images across device classes', function() {
+                var result = getLaunchStoryboardContentsJSON(multiDeviceLaunchStoryboardImages, '');
+                expect(result).toBeDefined();
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-json/varied-device'));
+            });
+        });
+
+        describe('#getLaunchStoryboardImagesDir', function() {
+            var getLaunchStoryboardImagesDir = prepare.__get__('getLaunchStoryboardImagesDir');
+            var projectRoot = iosProject;
+
+            it('should find the Images.xcassets file in a project with an asset catalog', function() {
+                var platformProjDir = path.join('platforms', 'ios', 'SampleApp');
+                var assetCatalogPath = path.join(iosProject, platformProjDir, 'Images.xcassets');
+                var expectedPath = path.join(platformProjDir, 'Images.xcassets', 'LaunchStoryboard.imageset/');
+
+                var fileExists = shell.test('-e', assetCatalogPath);
+                expect(fileExists).toEqual(true);
+
+                var returnPath = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
+                expect(returnPath).toEqual(expectedPath);
+            });
+
+            it('should NOT find the Images.xcassets file in a project with no asset catalog', function() {
+                var platformProjDir = path.join('platforms', 'ios', 'SamplerApp');
+                var assetCatalogPath = path.join(iosProject, platformProjDir, 'Images.xcassets');
+
+                var fileExists = shell.test('-e', assetCatalogPath);
+                expect(fileExists).toEqual(false);
+
+                var returnPath = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
+                expect(returnPath).toBeNull();
+            });
+        });
+
+        describe ('#platformHasLaunchStoryboardImages', function() {
+            var platformHasLaunchStoryboardImages = prepare.__get__('platformHasLaunchStoryboardImages');
+            var cfgs = ['none', 'legacy-only', 'modern-only', 'modern-and-legacy'].reduce(function (p,c) {
+                p[c] = new ConfigParser(path.join(FIXTURES, 'launch-storyboard-support', 'configs', c + '.xml'));
+                return p;
+            }, {});
+
+            it('should be false with no launch images', function() {
+                expect(platformHasLaunchStoryboardImages(cfgs.none)).toEqual(false);
+            });
+            it('should be false with only legacy images', function() {
+                expect(platformHasLaunchStoryboardImages(cfgs['legacy-only'])).toEqual(false);
+            });
+            it('should be true with typical launch storyboard images', function() {
+                expect(platformHasLaunchStoryboardImages(cfgs['modern-only'])).toEqual(true);
+            });
+            it('should be true with typical and legacy launch storyboard images', function() {
+                expect(platformHasLaunchStoryboardImages(cfgs['modern-and-legacy'])).toEqual(true);
+            });
+        });
+
+        describe ('#platformHasLegacyLaunchImages', function() {
+            var platformHasLegacyLaunchImages = prepare.__get__('platformHasLegacyLaunchImages');
+            var cfgs = ['none', 'legacy-only', 'modern-only', 'modern-and-legacy'].reduce(function (p,c) {
+                p[c] = new ConfigParser(path.join(FIXTURES, 'launch-storyboard-support', 'configs', c + '.xml'));
+                return p;
+            }, {});
+
+            it('should be false with no launch images', function() {
+                expect(platformHasLegacyLaunchImages(cfgs.none)).toEqual(false);
+            });
+            it('should be true with only legacy images', function() {
+                expect(platformHasLegacyLaunchImages(cfgs['legacy-only'])).toEqual(true);
+            });
+            it('should be false with typical launch storyboard images', function() {
+                expect(platformHasLegacyLaunchImages(cfgs['modern-only'])).toEqual(false);
+            });
+            it('should be true with typical and legacy launch storyboard images', function() {
+                expect(platformHasLegacyLaunchImages(cfgs['modern-and-legacy'])).toEqual(true);
+            });
+
+        });
+
+        describe('#updateProjectPlistForLaunchStoryboard', function() {
+            var updateProjectPlistForLaunchStoryboard = prepare.__get__('updateProjectPlistForLaunchStoryboard');
+            var plistFile = path.join(iosPlatform, 'SampleApp', 'SampleApp-Info.plist');
+            var cfgs;
+            it('setup', function () {
+                cfgs = ['none', 'legacy-only', 'modern-only', 'modern-and-legacy'].reduce(function (p,c) {
+                    p[c] = {
+                        config: new ConfigParser(path.join(FIXTURES, 'launch-storyboard-support', 'configs', c + '.xml')),
+                        plist: plist.parse(fs.readFileSync(plistFile, 'utf8'))
+                    };
+                    return p;
+                }, {});
+            });
+
+            it('should not change the info plist when no launch images are supplied', function() {
+                var plist = cfgs.none.plist;
+                updateProjectPlistForLaunchStoryboard(cfgs.none.config, plist);
+                expect(plist.UILaunchStoryboardName).toBeUndefined();
+            });
+            it('should not change the info plist when only legacy launch images are supplied', function() {
+                var plist = cfgs['legacy-only'].plist;
+                updateProjectPlistForLaunchStoryboard(cfgs['legacy-only'].config, plist);
+                expect(plist.UILaunchStoryboardName).toBeUndefined();
+            });
+            it('should change the info plist when only modern launch images are supplied', function() {
+                var plist = cfgs['modern-only'].plist;
+                updateProjectPlistForLaunchStoryboard(cfgs['modern-only'].config, plist);
+                expect(plist.UILaunchStoryboardName).toEqual('CDVLaunchScreen');
+            });
+            it('should change the info plist when both legacy and modern launch images are supplied', function() {
+                var plist = cfgs['modern-and-legacy'].plist;
+                updateProjectPlistForLaunchStoryboard(cfgs['modern-and-legacy'].config, plist);
+                expect(plist.UILaunchStoryboardName).toEqual('CDVLaunchScreen');
+            });
+            it('should remove the setting when no launch images are supplied but storyboard setting configured', function() {
+                var plist = cfgs.none.plist;
+                plist.UILaunchStoryboardName = 'CDVLaunchScreen';
+                updateProjectPlistForLaunchStoryboard(cfgs.none.config, plist);
+                expect(plist.UILaunchStoryboardName).toBeUndefined();
+            });
+            it('should remove the setting when only legacy images are supplied but storyboard setting configured', function() {
+                var plist = cfgs['legacy-only'].plist;
+                plist.UILaunchStoryboardName = 'CDVLaunchScreen';
+                updateProjectPlistForLaunchStoryboard(cfgs['legacy-only'].config, plist);
+                expect(plist.UILaunchStoryboardName).toBeUndefined();
+            });
+            it('should maintain the launch storyboard setting over multiple calls when modern images supplied', function() {
+                var plist = cfgs['modern-only'].plist;
+                delete plist.UILaunchStoryboardName;
+                updateProjectPlistForLaunchStoryboard(cfgs['modern-and-legacy'].config, plist);
+                expect(plist.UILaunchStoryboardName).toEqual('CDVLaunchScreen');
+                updateProjectPlistForLaunchStoryboard(cfgs['modern-and-legacy'].config, plist);
+                expect(plist.UILaunchStoryboardName).toEqual('CDVLaunchScreen');
+            });
+            it('should not attempt to override launch storyboard setting if not set to our storyboard', function() {
+                var plist = cfgs['modern-and-legacy'].plist;
+                plist.UILaunchStoryboardName = 'AnotherStoryboard';
+                updateProjectPlistForLaunchStoryboard(cfgs['modern-and-legacy'].config, plist);
+                expect(plist.UILaunchStoryboardName).toEqual('AnotherStoryboard');
+            });
+
+        });
+
+        describe ('#updateLaunchStoryboardImages', function() {
+            var getLaunchStoryboardImagesDir = prepare.__get__('getLaunchStoryboardImagesDir');
+            var updateLaunchStoryboardImages = prepare.__get__('updateLaunchStoryboardImages');
+            var logFileOp = prepare.__get__('logFileOp');
+
+            it('should clean storyboard launch images and update contents.json', function() {
+                // spy!
+                var updatePaths = spyOn(FileUpdater, 'updatePaths');
+
+                // get appropriate paths
+                var projectRoot = iosProject;
+                var platformProjDir = path.join('platforms', 'ios', 'SampleApp');
+                var storyboardImagesDir = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
+
+                // create a suitable mock project for our method
+                var project = {
+                    root: iosProject,
+                    locations: p.locations,
+                    projectConfig: new ConfigParser(path.join(FIXTURES, 'launch-storyboard-support', 'configs', 'modern-only.xml'))
+                };
+
+                // copy the splash screen fixtures to the iOS project
+                shell.cp('-rf', path.join(FIXTURES, 'launch-storyboard-support', 'res'), iosProject);
+
+                // copy splash screens and update Contents.json
+                updateLaunchStoryboardImages(project, p.locations);
+
+                // verify that updatePaths was called as we expect
+                var expectedResourceMap = {
+                    'Default@2x~universal~comcom.png' : 'res/screen/ios/Default@2x~universal~comcom.png',
+                    'Default@2x~universal~comany.png' : 'res/screen/ios/Default@2x~universal~comany.png',
+                    'Default@2x~universal~anyany.png' : 'res/screen/ios/Default@2x~universal~anyany.png',
+                    'Default@3x~universal~comany.png' : 'res/screen/ios/Default@3x~universal~comany.png',
+                    'Default@3x~universal~anycom.png' : 'res/screen/ios/Default@3x~universal~anycom.png',
+                    'Default@3x~universal~anyany.png' : 'res/screen/ios/Default@3x~universal~anyany.png' };
+                // update keys with path to storyboardImagesDir
+                for (var k in expectedResourceMap) {
+                    if (expectedResourceMap.hasOwnProperty(k)) {
+                        expectedResourceMap[storyboardImagesDir + k] = expectedResourceMap[k];
+                        delete expectedResourceMap[k];
+                    }
+                }
+                expect(updatePaths).toHaveBeenCalledWith( expectedResourceMap, {
+                        rootDir: project.root
+                    }, logFileOp
+                );
+
+                // verify that that Contents.json is as we expect
+                var result = JSON.parse(fs.readFileSync(path.join(project.root, storyboardImagesDir, 'Contents.json')));
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-json/typical-universal')); 
+            });
+        });
+
+        describe ('#cleanLaunchStoryboardImages', function() {
+            var getLaunchStoryboardImagesDir = prepare.__get__('getLaunchStoryboardImagesDir');
+            var updateLaunchStoryboardImages = prepare.__get__('updateLaunchStoryboardImages');
+            var cleanLaunchStoryboardImages = prepare.__get__('cleanLaunchStoryboardImages');
+            var logFileOp = prepare.__get__('logFileOp');
+
+            it('should move launch images and update contents.json', function() {
+
+                var projectRoot = iosProject;
+                var platformProjDir = path.join('platforms', 'ios', 'SampleApp');
+                var storyboardImagesDir = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
+                var project = {
+                    root: iosProject,
+                    locations: p.locations,
+                    projectConfig: new ConfigParser(path.join(FIXTURES, 'launch-storyboard-support', 'configs', 'modern-only.xml'))
+                };
+
+                shell.cp('-rf', path.join(FIXTURES, 'launch-storyboard-support', 'res'), iosProject);
+                updateLaunchStoryboardImages(project, p.locations);
+
+                // now, clean the images
+                var updatePaths = spyOn(FileUpdater, 'updatePaths');
+                cleanLaunchStoryboardImages(projectRoot, project.projectConfig, p.locations);
+
+                // verify that updatePaths was called as we expect
+                var expectedResourceMap = {
+                    'Default@2x~universal~comcom.png' : null,
+                    'Default@2x~universal~comany.png' : null,
+                    'Default@2x~universal~anyany.png' : null, 
+                    'Default@3x~universal~comany.png' : null,
+                    'Default@3x~universal~anycom.png' : null,
+                    'Default@3x~universal~anyany.png' : null };
+                // update keys with path to storyboardImagesDir
+                for (var k in expectedResourceMap) {
+                    if (expectedResourceMap.hasOwnProperty(k)) {
+                        expectedResourceMap[storyboardImagesDir + k] = null;
+                        delete expectedResourceMap[k];
+                    }
+                }
+                expect(updatePaths).toHaveBeenCalledWith( expectedResourceMap, {
+                        rootDir: project.root,
+                        all: true
+                    }, logFileOp
+                );
+
+                // verify that that Contents.json is as we expect
+                var result = JSON.parse(fs.readFileSync(path.join(project.root, storyboardImagesDir, 'Contents.json')));
+                expect(result).toEqual(require('./fixtures/launch-storyboard-support/contents-json/empty')); 
+            });
+        });
+
+        describe ('#checkIfBuildSettingsNeedUpdatedForLaunchStoryboard', function() {
+            var checkIfBuildSettingsNeedUpdatedForLaunchStoryboard = prepare.__get__('checkIfBuildSettingsNeedUpdatedForLaunchStoryboard');
+            var updateProjectPlistForLaunchStoryboard = prepare.__get__('updateProjectPlistForLaunchStoryboard');
+            var plistFile = path.join(iosPlatform, 'SampleApp', 'SampleApp-Info.plist');
+            var cfgs; 
+            it ('setup', function() {
+                cfgs = ['none', 'legacy-only', 'modern-only', 'modern-and-legacy'].reduce(function (p,c) {
+                    p[c] = {
+                        config: new ConfigParser(path.join(FIXTURES, 'launch-storyboard-support', 'configs', c + '.xml')),
+                        plist: plist.parse(fs.readFileSync(plistFile, 'utf8'))
+                    };
+                    return p;
+                }, {});
+            });
+
+            it('should return false with no launch images', function () {
+                var cfg = cfgs.none;
+                updateProjectPlistForLaunchStoryboard(cfg.config, cfg.plist);
+                expect(checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(cfg.config, cfg.plist)).toEqual(false);
+            });
+            it('should return true with only legacy images', function () {
+                // why? because legacy images require Xcode to compile launch image assets
+                // and we may have previously removed that setting
+                var cfg = cfgs['legacy-only'];
+                updateProjectPlistForLaunchStoryboard(cfg.config, cfg.plist);
+                expect(checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(cfg.config, cfg.plist)).toEqual(true);
+            });
+            it('should return true with only storyboard images', function () {
+                var cfg = cfgs['modern-only'];
+                updateProjectPlistForLaunchStoryboard(cfg.config, cfg.plist);
+                expect(checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(cfg.config, cfg.plist)).toEqual(true);
+            });
+            it('should return false with storyboard and legacy images', function () {
+                // why? because we assume that the build settings will still build the asset catalog
+                // the user has specified both legacy and modern images, so why question it?
+                var cfg = cfgs['modern-and-legacy'];
+                updateProjectPlistForLaunchStoryboard(cfg.config, cfg.plist);
+                expect(checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(cfg.config, cfg.plist)).toEqual(false);
+            });
+
+        });
+
+        describe ('#updateBuildSettingsForLaunchStoryboard', function() {
+            var updateBuildSettingsForLaunchStoryboard = prepare.__get__('updateBuildSettingsForLaunchStoryboard');
+            var updateProjectPlistForLaunchStoryboard = prepare.__get__('updateProjectPlistForLaunchStoryboard');
+            var plistFile = path.join(iosPlatform, 'SampleApp', 'SampleApp-Info.plist');
+            var cfgs;
+            it('setup', function () {
+                cfgs = ['legacy-only', 'modern-only'].reduce(function (p,c) {
+                    p[c] = {
+                        config: new ConfigParser(path.join(FIXTURES, 'launch-storyboard-support', 'configs', c + '.xml')),
+                        plist: plist.parse(fs.readFileSync(plistFile, 'utf8'))
+                    };
+                    return p;
+                }, {});
+            });
+
+            it('should update build property with only legacy images', function () {
+                var cfg = cfgs['legacy-only'];
+                var proj = new xcode.project(p.locations.pbxproj);
+                proj.parseSync();
+                updateProjectPlistForLaunchStoryboard(cfg.config, cfg.plist);
+                updateBuildSettingsForLaunchStoryboard(proj, cfg.config, cfg.plist);
+                expect(proj.getBuildProperty('ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME')).toEqual('LaunchImage');
+            });
+            it('should remove build property with only storyboard images', function () {
+                var cfg = cfgs['modern-only'];
+                var proj = new xcode.project(p.locations.pbxproj);
+                proj.parseSync();
+                // set a value for our asset catalog to make sure it really goes away
+                proj.updateBuildProperty('ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME','LaunchImage');
+                updateProjectPlistForLaunchStoryboard(cfg.config, cfg.plist);
+                updateBuildSettingsForLaunchStoryboard(proj, cfg.config, cfg.plist);
+                expect(proj.getBuildProperty('ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME')).toBeUndefined();
+            });
+        });
+
+
+    });
+
     describe('updateProject method', function() {
         var mv;
         var update_name;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[4/4] ios commit: CB-12155: Create tests for launch storyboards

Posted by ks...@apache.org.
CB-12155: Create tests for launch storyboards

 This closes #280

(cherry picked from commit 4b86462452ffe69b33a54561e0d12583057592a8)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a675f938
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a675f938
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a675f938

Branch: refs/heads/4.3.x
Commit: a675f9387ad253fe662d68471515931cbedc0abc
Parents: bc82aff
Author: Kerri Shotts <ks...@apache.org>
Authored: Fri Nov 18 15:43:40 2016 -0600
Committer: Kerri Shotts <ks...@apache.org>
Committed: Mon Nov 21 15:24:03 2016 -0600

----------------------------------------------------------------------
 .../AppIcon.appiconset/Contents.json            | 182 +++++++
 .../AppIcon.appiconset/icon-40.png              | Bin 0 -> 4082 bytes
 .../AppIcon.appiconset/icon-40@2x.png           | Bin 0 -> 7411 bytes
 .../AppIcon.appiconset/icon-50.png              | Bin 0 -> 4874 bytes
 .../AppIcon.appiconset/icon-50@2x.png           | Bin 0 -> 9611 bytes
 .../AppIcon.appiconset/icon-60@2x.png           | Bin 0 -> 11924 bytes
 .../AppIcon.appiconset/icon-60@3x.png           | Bin 0 -> 30083 bytes
 .../AppIcon.appiconset/icon-72.png              | Bin 0 -> 4944 bytes
 .../AppIcon.appiconset/icon-72@2x.png           | Bin 0 -> 11706 bytes
 .../AppIcon.appiconset/icon-76.png              | Bin 0 -> 7025 bytes
 .../AppIcon.appiconset/icon-76@2x.png           | Bin 0 -> 15262 bytes
 .../AppIcon.appiconset/icon-83.5@2x.png         | Bin 0 -> 20563 bytes
 .../AppIcon.appiconset/icon-small.png           | Bin 0 -> 3294 bytes
 .../AppIcon.appiconset/icon-small@2x.png        | Bin 0 -> 5608 bytes
 .../AppIcon.appiconset/icon-small@3x.png        | Bin 0 -> 7040 bytes
 .../Images.xcassets/AppIcon.appiconset/icon.png | Bin 0 -> 3902 bytes
 .../AppIcon.appiconset/icon@2x.png              | Bin 0 -> 7869 bytes
 .../SampleApp/Images.xcassets/Contents.json     |   6 +
 .../LaunchImage.launchimage/Contents.json       | 156 ++++++
 .../Default-568h@2x~iphone.png                  | Bin 0 -> 34225 bytes
 .../LaunchImage.launchimage/Default-667h.png    | Bin 0 -> 57532 bytes
 .../LaunchImage.launchimage/Default-736h.png    | Bin 0 -> 80929 bytes
 .../Default-Landscape-736h.png                  | Bin 0 -> 79491 bytes
 .../Default-Landscape@2x~ipad.png               | Bin 0 -> 212234 bytes
 .../Default-Landscape~ipad.png                  | Bin 0 -> 91810 bytes
 .../Default-Portrait@2x~ipad.png                | Bin 0 -> 212860 bytes
 .../Default-Portrait~ipad.png                   | Bin 0 -> 91713 bytes
 .../Default@2x~iphone.png                       | Bin 0 -> 29475 bytes
 .../LaunchImage.launchimage/Default~iphone.png  | Bin 0 -> 10394 bytes
 .../LaunchStoryboard.imageset/Contents.json     | 168 +++++++
 .../configs/legacy-only.xml                     |  35 ++
 .../configs/modern-and-legacy.xml               |  42 ++
 .../configs/modern-only.xml                     |  32 ++
 .../launch-storyboard-support/configs/none.xml  |  24 +
 .../contents-json/empty.js                      | 135 ++++++
 .../contents-json/single-2xanyany.js            | 136 ++++++
 .../contents-json/typical-universal.js          | 141 ++++++
 .../contents-json/varied-device.js              | 144 ++++++
 .../contents-map/empty-map.js                   | 194 ++++++++
 .../contents-map/single-2xanyany-map.js         | 197 ++++++++
 .../contents-map/typical-universal-map.js       | 212 ++++++++
 .../contents-map/varied-device-map.js           | 221 +++++++++
 .../screen/ios/Default@2x~universal~anyany.png  | Bin 0 -> 97812 bytes
 .../screen/ios/Default@2x~universal~comany.png  | Bin 0 -> 67990 bytes
 .../screen/ios/Default@2x~universal~comcom.png  | Bin 0 -> 55854 bytes
 .../screen/ios/Default@3x~universal~anyany.png  | Bin 0 -> 85826 bytes
 .../screen/ios/Default@3x~universal~anycom.png  | Bin 0 -> 75337 bytes
 .../screen/ios/Default@3x~universal~comany.png  | Bin 0 -> 74537 bytes
 tests/spec/unit/prepare.spec.js                 | 482 ++++++++++++++++++-
 49 files changed, 2506 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/Contents.json
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/Contents.json b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d19e65f
--- /dev/null
+++ b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,182 @@
+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "filename" : "icon-small.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "filename" : "icon-small@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "filename" : "icon-small@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "filename" : "icon-40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "filename" : "icon-60@2x.png",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "57x57",
+      "filename" : "icon.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "57x57",
+      "filename" : "icon@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "filename" : "icon-60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "filename" : "icon-60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "filename" : "icon-small.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "filename" : "icon-small@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "filename" : "icon-40.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "filename" : "icon-40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "50x50",
+      "filename" : "icon-50.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "50x50",
+      "filename" : "icon-50@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "72x72",
+      "filename" : "icon-72.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "72x72",
+      "filename" : "icon-72@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "filename" : "icon-76.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "filename" : "icon-76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "83.5x83.5",
+      "filename" : "icon-83.5@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "24x24",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "notificationCenter",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "27.5x27.5",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "notificationCenter",
+      "subtype" : "42mm"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "watch",
+      "role" : "companionSettings",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "watch",
+      "role" : "companionSettings",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "appLauncher",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "44x44",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "longLook",
+      "subtype" : "42mm"
+    },
+    {
+      "size" : "86x86",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "quickLook",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "98x98",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "quickLook",
+      "subtype" : "42mm"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40.png
new file mode 100644
index 0000000..e865adb
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40@2x.png
new file mode 100644
index 0000000..6d07dce
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-40@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50.png
new file mode 100644
index 0000000..98a9d96
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50@2x.png
new file mode 100644
index 0000000..bac693f
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-50@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@2x.png
new file mode 100644
index 0000000..955af36
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@3x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@3x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@3x.png
new file mode 100644
index 0000000..e126891
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-60@3x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72.png
new file mode 100644
index 0000000..8c6e5df
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72@2x.png
new file mode 100644
index 0000000..dd819da
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-72@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76.png
new file mode 100644
index 0000000..63afe7f
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76@2x.png
new file mode 100644
index 0000000..4cff29a
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-76@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-83.5@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-83.5@2x.png
new file mode 100644
index 0000000..3c1a011
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small.png
new file mode 100644
index 0000000..0ea1c42
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@2x.png
new file mode 100644
index 0000000..2c72038
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@3x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@3x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@3x.png
new file mode 100644
index 0000000..5c37dfc
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon-small@3x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon.png
new file mode 100644
index 0000000..b2571a7
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon@2x.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon@2x.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon@2x.png
new file mode 100644
index 0000000..d75098f
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/AppIcon.appiconset/icon@2x.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/Contents.json
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/Contents.json b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Contents.json
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Contents.json b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Contents.json
new file mode 100644
index 0000000..175f378
--- /dev/null
+++ b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Contents.json
@@ -0,0 +1,156 @@
+{
+  "images" : [
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "736h",
+      "filename" : "Default-736h.png",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "736h",
+      "filename" : "Default-Landscape-736h.png",
+      "minimum-system-version" : "8.0",
+      "orientation" : "landscape",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "667h",
+      "filename" : "Default-667h.png",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "Default@2x~iphone.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "retina4",
+      "filename" : "Default-568h@2x~iphone.png",
+      "minimum-system-version" : "7.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "Default-Portrait~ipad.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "filename" : "Default-Landscape~ipad.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "Default-Portrait@2x~ipad.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "filename" : "Default-Landscape@2x~ipad.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "Default~iphone.png",
+      "extent" : "full-screen",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "Default@2x~iphone.png",
+      "extent" : "full-screen",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "Default-568h@2x~iphone.png",
+      "extent" : "full-screen",
+      "subtype" : "retina4",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "extent" : "to-status-bar",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "Default-Portrait~ipad.png",
+      "extent" : "full-screen",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "to-status-bar",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "extent" : "to-status-bar",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "Default-Portrait@2x~ipad.png",
+      "extent" : "full-screen",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "to-status-bar",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png
new file mode 100644
index 0000000..10ed683
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-667h.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-667h.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-667h.png
new file mode 100644
index 0000000..d9bcf61
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-667h.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-736h.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-736h.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-736h.png
new file mode 100644
index 0000000..1fcef22
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-736h.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png
new file mode 100644
index 0000000..eae0792
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape@2x~ipad.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape@2x~ipad.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape@2x~ipad.png
new file mode 100644
index 0000000..1fc8c7d
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape@2x~ipad.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png
new file mode 100644
index 0000000..58ea2fb
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait@2x~ipad.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait@2x~ipad.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait@2x~ipad.png
new file mode 100644
index 0000000..1570b37
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait@2x~ipad.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png
new file mode 100644
index 0000000..223e75d
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default@2x~iphone.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default@2x~iphone.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default@2x~iphone.png
new file mode 100644
index 0000000..0098dc7
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default@2x~iphone.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default~iphone.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default~iphone.png b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default~iphone.png
new file mode 100644
index 0000000..42b8fde
Binary files /dev/null and b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchImage.launchimage/Default~iphone.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchStoryboard.imageset/Contents.json
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchStoryboard.imageset/Contents.json b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchStoryboard.imageset/Contents.json
new file mode 100644
index 0000000..71f82ac
--- /dev/null
+++ b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Images.xcassets/LaunchStoryboard.imageset/Contents.json
@@ -0,0 +1,168 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "1x",
+      "height-class" : "compact"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x",
+      "height-class" : "compact"
+    },
+    {
+      "idiom" : "universal",
+      "height-class" : "compact",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "1x",
+      "width-class" : "compact"
+    },
+    {
+      "idiom" : "universal",
+      "width-class" : "compact",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "width-class" : "compact",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "universal",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "1x",
+      "height-class" : "compact"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "2x",
+      "height-class" : "compact"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "3x",
+      "height-class" : "compact"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "1x",
+      "width-class" : "compact"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "2x",
+      "width-class" : "compact"
+    },
+    {
+      "idiom" : "iphone",
+      "scale" : "3x",
+      "width-class" : "compact"
+    },
+    {
+      "idiom" : "iphone",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "iphone",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "ipad",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "height-class" : "compact"
+    },
+    {
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "height-class" : "compact"
+    },
+    {
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "width-class" : "compact"
+    },
+    {
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "width-class" : "compact"
+    },
+    {
+      "idiom" : "ipad",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "width-class" : "compact",
+      "height-class" : "compact",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/configs/legacy-only.xml
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/configs/legacy-only.xml b/tests/spec/unit/fixtures/launch-storyboard-support/configs/legacy-only.xml
new file mode 100644
index 0000000..2917aac
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/configs/legacy-only.xml
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget android-packageName="io.cordova.hellocordova.android" id="io.cordova.hellocordova" ios-CFBundleIdentifier="io.cordova.hellocordova.ios" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <name>Hello Cordova</name>
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
+        Apache Cordova Team
+    </author>
+    <content src="index.html" />
+
+    <platform name="ios">
+        <preference name="orientation" value="all" />
+        <preference name="target-device" value="handset" />
+        <preference name="deployment-target" value="8.0" />
+
+        <splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
+        <splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
+        <splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
+        <splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
+        <splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
+        <splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
+        <splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
+        <splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
+        <splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
+        <splash src="res/screen/ios/Default-Landscape-736h.png" width="2208" height="1242"/>
+    </platform>
+
+    <access origin="http://*.apache.org" />
+    <access origin="https://*.apache.org" />
+
+    <allow-navigation href="http://*.apache.org" />
+    <allow-navigation href="https://*.apache.org" />
+    �
+</widget>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-and-legacy.xml
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-and-legacy.xml b/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-and-legacy.xml
new file mode 100644
index 0000000..1bf60ae
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-and-legacy.xml
@@ -0,0 +1,42 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget android-packageName="io.cordova.hellocordova.android" id="io.cordova.hellocordova" ios-CFBundleIdentifier="io.cordova.hellocordova.ios" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <name>Hello Cordova</name>
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
+        Apache Cordova Team
+    </author>
+    <content src="index.html" />
+
+    <platform name="ios">
+        <preference name="orientation" value="all" />
+        <preference name="target-device" value="handset" />
+        <preference name="deployment-target" value="8.0" />
+
+        <splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
+        <splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
+        <splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
+        <splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
+        <splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
+        <splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
+        <splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
+        <splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
+        <splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
+        <splash src="res/screen/ios/Default-Landscape-736h.png" width="2208" height="1242"/>
+
+        <splash src="res/screen/ios/Default@2x~universal~anyany.png" />
+        <splash src="res/screen/ios/Default@2x~universal~comany.png" />
+        <splash src="res/screen/ios/Default@2x~universal~comcom.png" />
+        <splash src="res/screen/ios/Default@3x~universal~anyany.png" />
+        <splash src="res/screen/ios/Default@3x~universal~anycom.png" />
+        <splash src="res/screen/ios/Default@3x~universal~comany.png" />
+    </platform>
+
+    <access origin="http://*.apache.org" />
+    <access origin="https://*.apache.org" />
+
+    <allow-navigation href="http://*.apache.org" />
+    <allow-navigation href="https://*.apache.org" />
+    �
+</widget>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-only.xml
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-only.xml b/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-only.xml
new file mode 100644
index 0000000..5548897
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/configs/modern-only.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget android-packageName="io.cordova.hellocordova.android" id="io.cordova.hellocordova" ios-CFBundleIdentifier="io.cordova.hellocordova.ios" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <name>Hello Cordova</name>
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
+        Apache Cordova Team
+    </author>
+    <content src="index.html" />
+
+    <platform name="ios">
+        <preference name="orientation" value="all" />
+        <preference name="target-device" value="handset" />
+        <preference name="deployment-target" value="8.0" />
+
+        <splash src="res/screen/ios/Default@2x~universal~anyany.png" />
+        <splash src="res/screen/ios/Default@2x~universal~comany.png" />
+        <splash src="res/screen/ios/Default@2x~universal~comcom.png" />
+        <splash src="res/screen/ios/Default@3x~universal~anyany.png" />
+        <splash src="res/screen/ios/Default@3x~universal~anycom.png" />
+        <splash src="res/screen/ios/Default@3x~universal~comany.png" />
+    </platform>
+
+    <access origin="http://*.apache.org" />
+    <access origin="https://*.apache.org" />
+
+    <allow-navigation href="http://*.apache.org" />
+    <allow-navigation href="https://*.apache.org" />
+    �
+</widget>
+

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/configs/none.xml
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/configs/none.xml b/tests/spec/unit/fixtures/launch-storyboard-support/configs/none.xml
new file mode 100644
index 0000000..1dc7487
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/configs/none.xml
@@ -0,0 +1,24 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget android-packageName="io.cordova.hellocordova.android" id="io.cordova.hellocordova" ios-CFBundleIdentifier="io.cordova.hellocordova.ios" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <name>Hello Cordova</name>
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
+        Apache Cordova Team
+    </author>
+    <content src="index.html" />
+
+    <platform name="ios">
+        <preference name="orientation" value="all" />
+        <preference name="target-device" value="handset" />
+        <preference name="deployment-target" value="8.0" />
+    </platform>
+
+    <access origin="http://*.apache.org" />
+    <access origin="https://*.apache.org" />
+
+    <allow-navigation href="http://*.apache.org" />
+    <allow-navigation href="https://*.apache.org" />
+    �
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/empty.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/empty.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/empty.js
new file mode 100644
index 0000000..6b7663a
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/empty.js
@@ -0,0 +1,135 @@
+module.exports = {
+    "images": [{
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x"
+    }],
+    "info": {
+        "author": "Xcode",
+        "version": 1
+    }
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/single-2xanyany.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/single-2xanyany.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/single-2xanyany.js
new file mode 100644
index 0000000..c58f6c4
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/single-2xanyany.js
@@ -0,0 +1,136 @@
+module.exports = {
+    "images": [{
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "filename": "Default@2x~universal~anyany.png"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x"
+    }],
+    "info": {
+        "author": "Xcode",
+        "version": 1
+    }
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/typical-universal.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/typical-universal.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/typical-universal.js
new file mode 100644
index 0000000..0e8e986
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/typical-universal.js
@@ -0,0 +1,141 @@
+module.exports = {
+    "images": [{
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact",
+        "filename": "Default@2x~universal~comcom.png"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact",
+        "filename": "Default@2x~universal~comany.png"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "filename": "Default@2x~universal~anyany.png"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact",
+        "filename": "Default@3x~universal~comany.png"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "height-class": "compact",
+        "filename": "Default@3x~universal~anycom.png"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "filename": "Default@3x~universal~anyany.png"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x"
+    }],
+    "info": {
+        "author": "Xcode",
+        "version": 1
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/varied-device.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/varied-device.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/varied-device.js
new file mode 100644
index 0000000..548ea04
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-json/varied-device.js
@@ -0,0 +1,144 @@
+module.exports = {
+    "images": [{
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "1x"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact",
+        "filename": "Default@2x~universal~comcom.png"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "width-class": "compact",
+        "filename": "Default@2x~universal~comany.png"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "2x",
+        "filename": "Default@2x~universal~anyany.png"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "width-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x",
+        "height-class": "compact"
+    }, {
+        "idiom": "universal",
+        "scale": "3x"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "1x"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact",
+        "filename": "Default@2x~ipad~comcom.png"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width-class": "compact",
+        "filename": "Default@2x~ipad~comany.png"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "ipad",
+        "scale": "2x",
+        "filename": "Default@2x~ipad~anyany.png"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "1x"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "2x"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact",
+        "height-class": "compact"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width-class": "compact",
+        "filename": "Default@3x~iphone~comany.png"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "height-class": "compact",
+        "filename": "Default@3x~iphone~anycom.png"
+    }, {
+        "idiom": "iphone",
+        "scale": "3x",
+        "filename": "Default@3x~iphone~anyany.png"
+    }],
+    "info": {
+        "author": "Xcode",
+        "version": 1
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/empty-map.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/empty-map.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/empty-map.js
new file mode 100644
index 0000000..36d8a81
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/empty-map.js
@@ -0,0 +1,194 @@
+module.exports = [
+  {
+    "idiom": "universal",
+    "scale": "1x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "universal",
+    "scale": "1x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "universal",
+    "scale": "1x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "universal",
+    "scale": "1x",
+    "width": "any",
+    "height": "any"
+  },
+  {
+    "idiom": "universal",
+    "scale": "2x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "universal",
+    "scale": "2x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "universal",
+    "scale": "2x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "universal",
+    "scale": "2x",
+    "width": "any",
+    "height": "any"
+  },
+  {
+    "idiom": "universal",
+    "scale": "3x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "universal",
+    "scale": "3x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "universal",
+    "scale": "3x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "universal",
+    "scale": "3x",
+    "width": "any",
+    "height": "any"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "1x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "1x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "1x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "1x",
+    "width": "any",
+    "height": "any"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "2x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "2x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "2x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "ipad",
+    "scale": "2x",
+    "width": "any",
+    "height": "any"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "1x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "1x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "1x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "1x",
+    "width": "any",
+    "height": "any"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "2x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "2x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "2x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "2x",
+    "width": "any",
+    "height": "any"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "3x",
+    "width": "com",
+    "height": "com"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "3x",
+    "width": "com",
+    "height": "any"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "3x",
+    "width": "any",
+    "height": "com"
+  },
+  {
+    "idiom": "iphone",
+    "scale": "3x",
+    "width": "any",
+    "height": "any"
+  }
+];

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/single-2xanyany-map.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/single-2xanyany-map.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/single-2xanyany-map.js
new file mode 100644
index 0000000..5d8ec3d
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/single-2xanyany-map.js
@@ -0,0 +1,197 @@
+module.exports = [
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "any",
+        "height": "any",
+        "filename": "Default@2x~universal~anyany.png",
+        "src": "res/splash/ios/Default@2x~universal~anyany.png",
+        "target": "Default@2x~universal~anyany.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "any",
+        "height": "any"
+    }
+];

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/typical-universal-map.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/typical-universal-map.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/typical-universal-map.js
new file mode 100644
index 0000000..eef09ef
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/typical-universal-map.js
@@ -0,0 +1,212 @@
+module.exports = [
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "com",
+        "height": "com",
+        "filename": "Default@2x~universal~comcom.png",
+        "src": "res/splash/ios/Default@2x~universal~comcom.png",
+        "target": "Default@2x~universal~comcom.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "com",
+        "height": "any",
+        "filename": "Default@2x~universal~comany.png",
+        "src": "res/splash/ios/Default@2x~universal~comany.png",
+        "target": "Default@2x~universal~comany.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "any",
+        "height": "any",
+        "filename": "Default@2x~universal~anyany.png",
+        "src": "res/splash/ios/Default@2x~universal~anyany.png",
+        "target": "Default@2x~universal~anyany.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "com",
+        "height": "any",
+        "filename": "Default@3x~universal~comany.png",
+        "src": "res/splash/ios/Default@3x~universal~comany.png",
+        "target": "Default@3x~universal~comany.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "any",
+        "height": "com",
+        "filename": "Default@3x~universal~anycom.png",
+        "src": "res/splash/ios/Default@3x~universal~anycom.png",
+        "target": "Default@3x~universal~anycom.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "any",
+        "height": "any",
+        "filename": "Default@3x~universal~anyany.png",
+        "src": "res/splash/ios/Default@3x~universal~anyany.png",
+        "target": "Default@3x~universal~anyany.png"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "any",
+        "height": "any"
+    }
+];

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/varied-device-map.js
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/varied-device-map.js b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/varied-device-map.js
new file mode 100644
index 0000000..e6d39ed
--- /dev/null
+++ b/tests/spec/unit/fixtures/launch-storyboard-support/contents-map/varied-device-map.js
@@ -0,0 +1,221 @@
+module.exports = [
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "com",
+        "height": "com",
+        "filename": "Default@2x~universal~comcom.png",
+        "src": "res/splash/ios/Default@2x~universal~comcom.png",
+        "target": "Default@2x~universal~comcom.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "com",
+        "height": "any",
+        "filename": "Default@2x~universal~comany.png",
+        "src": "res/splash/ios/Default@2x~universal~comany.png",
+        "target": "Default@2x~universal~comany.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "2x",
+        "width": "any",
+        "height": "any",
+        "filename": "Default@2x~universal~anyany.png",
+        "src": "res/splash/ios/Default@2x~universal~anyany.png",
+        "target": "Default@2x~universal~anyany.png"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "universal",
+        "scale": "3x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "com",
+        "height": "com",
+        "filename": "Default@2x~ipad~comcom.png",
+        "src": "res/splash/ios/Default@2x~ipad~comcom.png",
+        "target": "Default@2x~ipad~comcom.png"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "com",
+        "height": "any",
+        "filename": "Default@2x~ipad~comany.png",
+        "src": "res/splash/ios/Default@2x~ipad~comany.png",
+        "target": "Default@2x~ipad~comany.png"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "ipad",
+        "scale": "2x",
+        "width": "any",
+        "height": "any",
+        "filename": "Default@2x~ipad~anyany.png",
+        "src": "res/splash/ios/Default@2x~ipad~anyany.png",
+        "target": "Default@2x~ipad~anyany.png"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "1x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "com",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "any",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "2x",
+        "width": "any",
+        "height": "any"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "com",
+        "height": "com"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "com",
+        "height": "any",
+        "filename": "Default@3x~iphone~comany.png",
+        "src": "res/splash/ios/Default@3x~iphone~comany.png",
+        "target": "Default@3x~iphone~comany.png"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "any",
+        "height": "com",
+        "filename": "Default@3x~iphone~anycom.png",
+        "src": "res/splash/ios/Default@3x~iphone~anycom.png",
+        "target": "Default@3x~iphone~anycom.png"
+    },
+    {
+        "idiom": "iphone",
+        "scale": "3x",
+        "width": "any",
+        "height": "any",
+        "filename": "Default@3x~iphone~anyany.png",
+        "src": "res/splash/ios/Default@3x~iphone~anyany.png",
+        "target": "Default@3x~iphone~anyany.png"
+    }
+];

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~anyany.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~anyany.png b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~anyany.png
new file mode 100644
index 0000000..1c647af
Binary files /dev/null and b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~anyany.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comany.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comany.png b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comany.png
new file mode 100644
index 0000000..11ceaee
Binary files /dev/null and b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comany.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comcom.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comcom.png b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comcom.png
new file mode 100644
index 0000000..8927308
Binary files /dev/null and b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@2x~universal~comcom.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anyany.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anyany.png b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anyany.png
new file mode 100644
index 0000000..21adbc0
Binary files /dev/null and b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anyany.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anycom.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anycom.png b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anycom.png
new file mode 100644
index 0000000..72b7250
Binary files /dev/null and b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~anycom.png differ

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a675f938/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~comany.png
----------------------------------------------------------------------
diff --git a/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~comany.png b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~comany.png
new file mode 100644
index 0000000..3c2693f
Binary files /dev/null and b/tests/spec/unit/fixtures/launch-storyboard-support/res/screen/ios/Default@3x~universal~comany.png differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/4] ios commit: CB-12084: Update project build settings & plist

Posted by ks...@apache.org.
CB-12084: Update project build settings & plist

If no legacy images are provided, we should remove the launch image asset
compiler setting. If legacy images are present, we should make sure it is
present. We also need to make sure to properly delete launch storyboard rather
than setting to undefined.

Other fix:
Roots need to be absolute for testing to work
Contents.json should be properly capitalized

 This closes #279

(cherry picked from commit b8ae88d822135a149ff1ea7b6e5feb045a2220eb)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/bc82aff6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/bc82aff6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/bc82aff6

Branch: refs/heads/4.3.x
Commit: bc82aff6a8287eb25969851853a2c2f2c60e120f
Parents: 4871643
Author: Kerri Shotts <ks...@apache.org>
Authored: Tue Nov 15 23:15:16 2016 -0600
Committer: Kerri Shotts <ks...@apache.org>
Committed: Mon Nov 21 15:23:51 2016 -0600

----------------------------------------------------------------------
 bin/templates/scripts/cordova/lib/prepare.js | 116 +++++++++++++++++-----
 1 file changed, 89 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bc82aff6/bin/templates/scripts/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/prepare.js b/bin/templates/scripts/cordova/lib/prepare.js
index 02dd457..d8f52ac 100644
--- a/bin/templates/scripts/cordova/lib/prepare.js
+++ b/bin/templates/scripts/cordova/lib/prepare.js
@@ -34,6 +34,14 @@ var PlatformMunger = require('cordova-common').ConfigChanges.PlatformMunger;
 var PluginInfoProvider = require('cordova-common').PluginInfoProvider;
 var FileUpdater = require('cordova-common').FileUpdater;
 
+// launch storyboard and related constants
+var LAUNCHIMAGE_BUILD_SETTING  = 'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME';
+var LAUNCHIMAGE_BUILD_SETTING_VALUE = 'LaunchImage';
+var UI_LAUNCH_STORYBOARD_NAME = 'UILaunchStoryboardName';
+var CDV_LAUNCH_STORYBOARD_NAME = 'CDVLaunchScreen';
+var IMAGESET_COMPACT_SIZE_CLASS = 'compact';
+var CDV_ANY_SIZE_CLASS = 'any';
+
 /*jshint sub:true*/
 
 module.exports.prepare = function (cordovaProject, options) {
@@ -214,7 +222,7 @@ function updateProject(platformConfig, locations) {
     fs.writeFileSync(plistFile, info_contents, 'utf-8');
     events.emit('verbose', 'Wrote out iOS Bundle Identifier "' + pkg + '" and iOS Bundle Version "' + version + '" to ' + plistFile);
 
-    return handleBuildSettings(platformConfig, locations).then(function() {
+    return handleBuildSettings(platformConfig, locations, infoPlist).then(function() {
         if (name == originalName) {
             events.emit('verbose', 'iOS Product Name has not changed (still "' + originalName + '")');
             return Q();
@@ -258,12 +266,14 @@ function handleOrientationSettings(platformConfig, infoPlist) {
     }
 }
 
-function handleBuildSettings(platformConfig, locations) {
+function handleBuildSettings(platformConfig, locations, infoPlist) {
     var targetDevice = parseTargetDevicePreference(platformConfig.getPreference('target-device', 'ios'));
     var deploymentTarget = platformConfig.getPreference('deployment-target', 'ios');
+    var needUpdatedBuildSettingsForLaunchStoryboard = checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(platformConfig, infoPlist);
 
-    // no build settings provided, we don't need to parse and update .pbxproj file
-    if (!targetDevice && !deploymentTarget) {
+    // no build settings provided and we don't need to update build settings for launch storyboards, 
+    // then we don't need to parse and update .pbxproj file
+    if (!targetDevice && !deploymentTarget && !needUpdatedBuildSettingsForLaunchStoryboard) {
         return Q();
     }
 
@@ -285,6 +295,8 @@ function handleBuildSettings(platformConfig, locations) {
         proj.updateBuildProperty('IPHONEOS_DEPLOYMENT_TARGET', deploymentTarget);
     }
 
+    updateBuildSettingsForLaunchStoryboard(proj, platformConfig, infoPlist);
+
     fs.writeFileSync(locations.pbxproj, proj.writeSync(), 'utf-8');
 
     return Q();
@@ -572,8 +584,6 @@ function mapLaunchStoryboardResources(splashScreens, launchStoryboardImagesDir)
  * @return {Object}
  */
 function getLaunchStoryboardContentsJSON(splashScreens, launchStoryboardImagesDir) {
-    var IMAGESET_COMPACT_SIZE_CLASS = 'compact';
-    var CDV_ANY_SIZE_CLASS = 'any';
 
     var platformLaunchStoryboardImages = mapLaunchStoryboardContents(splashScreens, launchStoryboardImagesDir);
     var contentsJSON = {
@@ -608,39 +618,91 @@ function getLaunchStoryboardContentsJSON(splashScreens, launchStoryboardImagesDi
 }
 
 /**
- * Updates the project's plist based upon our launch storyboard images. If there are no images, then we should
- * fall back to the regular launch images that might be supplied (that is, our app will be scaled on an iPad Pro),
- * and if there are some images, we need to alter the UILaunchStoryboardName property to point to 
- * CDVLaunchScreen.
+ * Determines if the project's build settings may need to be updated for launch storyboard support
  * 
- * There's some logic here to avoid overwriting changes the user might have made to their plist if they are using
- * their own launch storyboard.
  */
-function updateProjectPlistForLaunchStoryboard(platformConfig, infoPlist) {
-    var UI_LAUNCH_STORYBOARD_NAME = 'UILaunchStoryboardName';
-    var CDV_LAUNCH_STORYBOARD_NAME = 'CDVLaunchScreen';
-
-    var splashScreens = platformConfig.getSplashScreens('ios');
-    var contentsJSON = getLaunchStoryboardContentsJSON(splashScreens, '');  // note: we don't need a file path here; we're just counting
+function checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(platformConfig, infoPlist) {
+    var hasLaunchStoryboardImages = platformHasLaunchStoryboardImages(platformConfig);
+    var hasLegacyLaunchImages = platformHasLegacyLaunchImages(platformConfig);
     var currentLaunchStoryboard = infoPlist[UI_LAUNCH_STORYBOARD_NAME];
 
-    events.emit('verbose', 'Current launch storyboard ' + currentLaunchStoryboard);
+    if (hasLaunchStoryboardImages && currentLaunchStoryboard == CDV_LAUNCH_STORYBOARD_NAME && !hasLegacyLaunchImages) {
+        // don't need legacy launch images if we are using our launch storyboard
+        // so we do need to update the project file
+        events.emit('verbose', 'Need to update build settings because project is using our launch storyboard.');
+        return true;
+    } else if (hasLegacyLaunchImages && !currentLaunchStoryboard) {
+        // we do need to ensure legacy launch images are used if there's no launch storyboard present
+        // so we do need to update the project file
+        events.emit('verbose', 'Need to update build settings because project is using legacy launch images and no storyboard.');
+        return true;
+    }
+    events.emit('verbose', 'No need to update build settings for launch storyboard support.');
+    return false;
+}
 
+function updateBuildSettingsForLaunchStoryboard(proj, platformConfig, infoPlist) {
+    var hasLaunchStoryboardImages = platformHasLaunchStoryboardImages(platformConfig);
+    var hasLegacyLaunchImages = platformHasLegacyLaunchImages(platformConfig);
+    var currentLaunchStoryboard = infoPlist[UI_LAUNCH_STORYBOARD_NAME];
 
+    if (hasLaunchStoryboardImages && currentLaunchStoryboard == CDV_LAUNCH_STORYBOARD_NAME && !hasLegacyLaunchImages) {
+        // don't need legacy launch images if we are using our launch storyboard
+        events.emit('verbose', 'Removed ' + LAUNCHIMAGE_BUILD_SETTING + ' because project is using our launch storyboard.');
+        proj.removeBuildProperty(LAUNCHIMAGE_BUILD_SETTING);
+    } else if (hasLegacyLaunchImages && !currentLaunchStoryboard) {
+        // we do need to ensure legacy launch images are used if there's no launch storyboard present
+        events.emit('verbose', 'Set ' + LAUNCHIMAGE_BUILD_SETTING + ' to ' + LAUNCHIMAGE_BUILD_SETTING_VALUE + ' because project is using legacy launch images and no storyboard.');
+        proj.updateBuildProperty(LAUNCHIMAGE_BUILD_SETTING, LAUNCHIMAGE_BUILD_SETTING_VALUE);
+    } else {
+        events.emit('verbose', 'Did not update build settings for launch storyboard support.');
+    }
+}
+
+function splashScreensHaveLaunchStoryboardImages(contentsJSON) {
     /* do we have any launch images do we have for our launch storyboard?
      * Again, for old Node versions, the below code is equivalent to this:
-     *     var hasLaunchStoryboardImages = !!contentsJSON.images.find(function (item) {
+     *     return !!contentsJSON.images.find(function (item) {
      *        return item.filename !== undefined;
      *     });
      */
-    var hasLaunchStoryboardImages = !!contentsJSON.images.reduce(function (p, c) {
+    return !!contentsJSON.images.reduce(function (p, c) {
         return (c.filename !== undefined) ? c : p;
     }, undefined);
+}
+
+function platformHasLaunchStoryboardImages(platformConfig) {
+    var splashScreens = platformConfig.getSplashScreens('ios');
+    var contentsJSON = getLaunchStoryboardContentsJSON(splashScreens, '');  // note: we don't need a file path here; we're just counting
+    return splashScreensHaveLaunchStoryboardImages(contentsJSON);
+}
+
+function platformHasLegacyLaunchImages(platformConfig) {
+    var splashScreens = platformConfig.getSplashScreens('ios');
+    return !!splashScreens.reduce(function (p, c) {
+        return (c.width !== undefined || c.height !== undefined) ? c : p;
+    }, undefined);
+}
+
+/**
+ * Updates the project's plist based upon our launch storyboard images. If there are no images, then we should
+ * fall back to the regular launch images that might be supplied (that is, our app will be scaled on an iPad Pro),
+ * and if there are some images, we need to alter the UILaunchStoryboardName property to point to 
+ * CDVLaunchScreen.
+ * 
+ * There's some logic here to avoid overwriting changes the user might have made to their plist if they are using
+ * their own launch storyboard.
+ */
+function updateProjectPlistForLaunchStoryboard(platformConfig, infoPlist) {
+    var currentLaunchStoryboard = infoPlist[UI_LAUNCH_STORYBOARD_NAME];
+    events.emit('verbose', 'Current launch storyboard ' + currentLaunchStoryboard);
+
+    var hasLaunchStoryboardImages = platformHasLaunchStoryboardImages(platformConfig);
 
     if (hasLaunchStoryboardImages && !currentLaunchStoryboard) {
         // only change the launch storyboard if we have images to use AND the current value is blank
         // if it's not blank, we've either done this before, or the user has their own launch storyboard
-        events.emit('verbose', 'Changing project to use our launch storyboard');
+        events.emit('verbose', 'Changing info plist to use our launch storyboard');
         infoPlist[UI_LAUNCH_STORYBOARD_NAME] = CDV_LAUNCH_STORYBOARD_NAME;
         return;
     }
@@ -649,11 +711,11 @@ function updateProjectPlistForLaunchStoryboard(platformConfig, infoPlist) {
         // only revert to using the launch images if we have don't have any images for the launch storyboard
         // but only clear it if current launch storyboard is our storyboard; the user might be using their
         // own storyboard instead.
-        events.emit('verbose', 'Changing project to use launch images');
-        infoPlist[UI_LAUNCH_STORYBOARD_NAME] = undefined;
+        events.emit('verbose', 'Changing info plist to use legacy launch images');
+        delete infoPlist[UI_LAUNCH_STORYBOARD_NAME];
         return;
     }
-    events.emit('verbose', 'Not changing launch storyboard setting.');
+    events.emit('verbose', 'Not changing launch storyboard setting in info plist.');
 }
 
 /**
@@ -697,7 +759,7 @@ function updateLaunchStoryboardImages(cordovaProject, locations) {
             resourceMap, { rootDir: cordovaProject.root }, logFileOp);
         
         events.emit('verbose', 'Updating Storyboard image set contents.json');
-        fs.writeFileSync(path.join(launchStoryboardImagesDir, 'contents.json'),
+        fs.writeFileSync(path.join(cordovaProject.root, launchStoryboardImagesDir, 'Contents.json'),
                         JSON.stringify(contentsJSON, null, 2));
     }
 }
@@ -733,7 +795,7 @@ function cleanLaunchStoryboardImages(projectRoot, projectConfig, locations) {
         });
 
         events.emit('verbose', 'Updating Storyboard image set contents.json');
-        fs.writeFileSync(path.join(launchStoryboardImagesDir, 'contents.json'),
+        fs.writeFileSync(path.join(projectRoot, launchStoryboardImagesDir, 'Contents.json'),
                         JSON.stringify(contentsJSON, null, 2));
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org