Skip to content

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

Open
@raphinesse

Description

@raphinesse

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 apache/cordova-ios#613 (comment) 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 apache/cordova-ios#613 and apache/cordova-cli#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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions