cordova-docs icon indicating copy to clipboard operation
cordova-docs copied to clipboard

Inconsistencies in edit-config/config-file documentation involving plist files

Open raphinesse opened this issue 6 years ago • 0 comments

Bug Report

Problem

plist files are handled differently than XML files when used as the target of an edit-config or config-file tag (see https://github.com/apache/cordova-ios/issues/613#issuecomment-560923150 for details). In short: the tag content is matched and merged into the target node. That behavior is actually the same, whether you use an edit-config or config-file tag and it also does not change with the mode of the edit-config tag. And to make things worse, this behavior is different from the behavior of any of those tag variants when working with normal XML files.

There are various core plugins that use <edit-config file="*-Info.plist" mode="merge"> in their docs. At first it seems a natural choice, since edit-config and merge is exactly what is going to happen. However, edit-config actually only edits attributes for other XML files. This is also clearly stated in its docs.

This has been the source of some confusion (see https://github.com/apache/cordova-ios/issues/613 and https://github.com/apache/cordova-cli/issues/496), as people expected to be able to change the mode to achieve a different result. But as stated above that is not possible.

So I think the current situation needs to be documented more clearly and consistently.

raphinesse avatar Dec 03 '19 16:12 raphinesse