Skip to content

Emit warnings when Info.plist key values from different user-supplied sources conflict #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
owenv opened this issue Jan 28, 2025 · 2 comments · Fixed by #364 · May be fixed by #369
Closed

Emit warnings when Info.plist key values from different user-supplied sources conflict #5

owenv opened this issue Jan 28, 2025 · 2 comments · Fixed by #364 · May be fixed by #369
Labels
good first issue Good for newcomers

Comments

@owenv
Copy link
Collaborator

owenv commented Jan 28, 2025

Currently when a build setting corresponding to an Info.plist key is set, and the same Info.plist key is set in the INFOPLIST_FILE, the build system will silently overwrite one with the other.

Since the behavior of which wins might be surprising or non-obvious to users, we should emit a warning when the two sides are in conflict, so users can ensure the intended effect of the merging process.

For scalar values, this is straightforward, and for arrays and dictionaries, we might choose an append/merge behavior depending on the key, and also emit warnings for conflicting keys hierarchically throughout nested dictionaries.

@owenv owenv added the good first issue Good for newcomers label Jan 28, 2025
@theSalted
Copy link

theSalted commented Mar 27, 2025

Hi @owenv, I am interested in fixing this. Can you give me some pointers, mainly which framework targets handles Info.plist. Thanks!

@owenv
Copy link
Collaborator Author

owenv commented Mar 28, 2025

@theSalted sure! I recommend starting by taking a look at InfoPlistProcessorTaskAction.swift - this contains the implementation of the task which processes hand-authored Info.plist content, build settings, etc. to produce the complete Info.plist file which is embedded in the product. The defaultInfoPlistContent method in particular is a good place to start exploring how the various sources of info get merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
2 participants