Skip to content
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

Fix platformFilter usage for single filters #5544

Merged
merged 3 commits into from
Nov 5, 2023

Conversation

kwridan
Copy link
Collaborator

@kwridan kwridan commented Nov 2, 2023

Part of #5381

Short description πŸ“

  • XcodeProj format supports both a single platformFilter and multiple platformFilters (plural) attribute with the project file format
  • the singlular attribute appears to only be used for ios and maccatalyst while for all other filters, the plural form is used (even when specifying a single filter)
  • Xcode doesn't recognize the other filters such as tvos or macos when provided to platformF ilter
  • Xcode does support ios and maccatlyst when using the plural form however immediatley revert s it back to platformFilter causing an unstable generated project
  • To mitigate this those filters are explicitly specifed as the ones that can be used with the si ngle platformFilter

How to test the changes locally 🧐

  • platformFilters are not yet exposed via public API as such inspection via manually creating a p roject with a multi-platform target, apply filters and verify which attributes are in use to veri fy

Contributor checklist βœ…

  • The code has been linted using run make workspace/lint-fix
  • The change is tested via unit testing or acceptance testing, or both
  • The title of the PR is formulated in a way that is usable as a changelog entry
  • In case the PR introduces changes that affect users, the documentation has been updated

Reviewer checklist βœ…

  • The code architecture and patterns are consistent with the rest of the codebase
  • Reviewer has checked that, if needed, the PR includes the label changelog:added, changelog:fixed, or changelog:changed, and the title is usable as a changelog entry

@kwridan kwridan added the changelog:fixed PR will be listed in the Fixed section of CHANGELOG label Nov 2, 2023
@waltflanagan
Copy link
Member

Thanks for investigating how Xcode was dealing with these values. it was extremely confusing why things werent working with the multiplatform work.

kwridan and others added 2 commits November 3, 2023 16:52
- XcodeProj format supports both a single `platformFilter` and multiple `platformFilters` (plural) attribute with the project file format
- the singlular attribute appears to only be used for `ios` and `maccatalyst` while for all other
 filters, the plural form is used (even when specifying a single filter)
- Xcode doesn't recognize the other filters such as `tvos` or `macos` when provided to `platformF
ilter`
- Xcode does support `ios` and `maccatlyst` when using the plural form however immediatley revert
s it back to `platformFilter` causing an unstable generated project
- To mitigate this those filters are explicitly specifed as the ones that can be used with the si
ngle `platformFilter`

Test Plan:

- platformFilters are not yet exposed via public API as such inspection via manually creating a p
roject with a multi-platform target, apply filters and verify which attributes are in use to veri
fy
@danieleformichelli danieleformichelli merged commit 4969801 into main Nov 5, 2023
30 checks passed
@danieleformichelli danieleformichelli deleted the fix/platform-filters branch November 5, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:fixed PR will be listed in the Fixed section of CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants