cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-14141) Should be able to overwrite CDVLaunchScreen.storyboard with resource-file in config.xml
Date Sun, 02 Sep 2018 02:44:00 GMT


ASF GitHub Bot commented on CB-14141:

janpio closed pull request #373: CB-14141: Don't duplicate resource files in xcodeproj

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/templates/scripts/cordova/lib/prepare.js b/bin/templates/scripts/cordova/lib/prepare.js
index de345dd55..0a2daa423 100644
--- a/bin/templates/scripts/cordova/lib/prepare.js
+++ b/bin/templates/scripts/cordova/lib/prepare.js
@@ -497,7 +497,11 @@ function updateFileResources (cordovaProject, locations) {
         let targetPath = path.join(project.resources_dir, target);
         targetPath = path.relative(cordovaProject.root, targetPath);
-        project.xcode.addResourceFile(target);
+        if (!fs.existsSync(targetPath)) {
+            project.xcode.addResourceFile(target);
+        } else {
+            events.emit('warn', 'Overwriting existing resource file at ' + targetPath);
+        }
         resourceMap[targetPath] = src;


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Should be able to overwrite CDVLaunchScreen.storyboard with resource-file in config.xml
> ---------------------------------------------------------------------------------------
>                 Key: CB-14141
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-ios
>            Reporter: Darryl Pogue
>            Assignee: Darryl Pogue
>            Priority: Minor
> It should be possible to overwrite the CDVLaunchScreen.storyboard file using {{resource-file}}
in config.xml, but that has an unfortunate side effect of adding it to the Xcode project twice.
> When installing resources from config.xml {{resource-file}} tags, we should log a warning
if the file already exists and skip adding it to the Xcode project.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message