Skip to content

fix(settings): preserve values in legacy configurations - #243

Closed
pujx233 wants to merge 1 commit into
PlayCover:masterfrom
pujx233:fix/legacy-settings-decoding
Closed

pujx233 wants to merge 1 commit into
PlayCover:masterfrom
pujx233:fix/legacy-settings-decoding

Conversation

@pujx233

@pujx233 pujx233 commented Oct 16, 2026

Copy link
Copy Markdown

Older settings plists can omit newer keys such as displayRotation. Synthesized decoding then throws, causing PlaySettings to fall back to all defaults and ignore saved values such as resizable window mode and keymapping.

Decode each missing top-level field using its existing default while preserving saved values and still rejecting invalid types. Extract the model into a Foundation-only file and add standalone regression tests against the production decoder.

Validation:

  • bash Tests/run-settings-tests.sh: all four checks pass (legacy XML/binary plists, empty settings, current settings round-trip, invalid types). The legacy and empty cases fail with the original decoder.
  • SwiftLint --strict: passes for all changed Swift files.
  • Xcode project plist validation and git diff --check: pass.

Full iOS framework build not run: this machine has Command Line Tools but no full Xcode installation.

@TheMoonThatRises

Copy link
Copy Markdown
Member

This is not necessary as all settings updates and conversions should be done through the PlayCover app. PlayCover handles these updates on load, so PlayTools would not view older versions of a settings file. It is highly unlikely for PlayTools to view an outdated settings profile.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants