Skip to content

Commit

Permalink
(ios) fix: resolve correct path to app info plist when multiple plist…
Browse files Browse the repository at this point in the history
… files are present (#144).

When multiple plist files exists in a cordova-ios project (e.g. due to a plugin containing `<podspec>`), 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.
  • Loading branch information
dpa99c committed Jun 12, 2020
1 parent b5ba4db commit c9afe77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ConfigChanges/ConfigFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c9afe77

Please sign in to comment.