From 611762941abf3445f27c0d260138d4ca8bdd5407 Mon Sep 17 00:00:00 2001 From: Josh Buckley Date: Wed, 27 Apr 2016 21:51:10 +0100 Subject: [PATCH] Add `useXCAssetsPath` option. Set to true to write files to the default path used in Cordova iOS 4 --- lib/profiles.coffee | 5 ++++- tasks/phonegapsplash.coffee | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/profiles.coffee b/lib/profiles.coffee index f60b547..b89c360 100644 --- a/lib/profiles.coffee +++ b/lib/profiles.coffee @@ -87,7 +87,10 @@ module.exports = (config) -> ] # iOS (Retina and legacy resolutions) 'ios': - dir: path.join 'platforms', 'ios', config.prjName, 'Resources', 'splash' + dir: if config.useXCAssetsPath + path.join 'platforms', 'ios', config.prjName, 'Images.xcassets', 'LaunchImage.launchimage' + else + path.join 'platforms', 'ios', config.prjName, 'Resources', 'splash' layout: landscape: splashs: [ diff --git a/tasks/phonegapsplash.coffee b/tasks/phonegapsplash.coffee index 1f73c07..76989be 100644 --- a/tasks/phonegapsplash.coffee +++ b/tasks/phonegapsplash.coffee @@ -33,7 +33,8 @@ module.exports = (grunt) -> layouts: [ 'portrait', 'landscape', 'none' ] profiles: [ 'android', 'bada', 'blackberry', 'ios', 'webos', 'windows-phone' - ] + ], + useXCAssetsPath: false # Get all profiles as constants PROFILES = (require '../lib/profiles') options # Check existence of source file