From c9afe77ab2b004f87a0426753a58a4aaaf0aded4 Mon Sep 17 00:00:00 2001 From: Dave Alden Date: Fri, 12 Jun 2020 14:21:41 +0100 Subject: [PATCH] (ios) fix: resolve correct path to app info plist when multiple plist files are present (#144). When multiple plist files exists in a cordova-ios project (e.g. due to a plugin containing ``), ConfigFile was updated under CB-5989 to select the app plist as the target for changes destined for *-Info.plist. However, the change made under CB-5989 incorrectly constructed the path to the app plist by omitting the project name subdirectory from the path, causing the fix to fail to work. This commit fixes this by correcting the constructed path to the app plist. --- src/ConfigChanges/ConfigFile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ConfigChanges/ConfigFile.js b/src/ConfigChanges/ConfigFile.js index 4e831199..2377b04a 100644 --- a/src/ConfigChanges/ConfigFile.js +++ b/src/ConfigChanges/ConfigFile.js @@ -174,8 +174,9 @@ function resolveConfigFilePath (project_dir, platform, file) { // [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist if (matches.length > 1 && file.includes('-Info.plist')) { - const plistName = `${getIOSProjectname(project_dir)}-Info.plist`; - const plistPath = path.join(project_dir, plistName); + const projName = getIOSProjectname(project_dir); + const plistName = `${projName}-Info.plist`; + const plistPath = path.join(project_dir, projName, plistName); if (matches.includes(plistPath)) return plistPath; } return filepath;