tuist / XcodeProj

πŸ“ Read, update and write your Xcode projects

Home Page:https://xcodeproj.tuist.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON decoder not properly decoding `defaultConfigurationIsVisible` in some projects

tjwio opened this issue Β· comments

Context πŸ•΅οΈβ€β™€οΈ

Some of our projects generated via BUCK have a plist encoding so the property looks like:

<key>defaultConfigurationIsVisible</key>
<false/>

instead of something like:

defaultConfigurationIsVisible = 0;

This causes the JSON encoder to encode the property as a boolean instead of a string, so the JSON decoder fails to decode that boolean properly since it thinks it's a string

What 🌱

This error is thrown when trying to decode defaultConfigurationIsVisible

error: typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "defaultConfigurationIsVisible", intValue: nil)], debugDescription: "Expected to decode String but found a number instead.", underlyingError: nil))

Proposal πŸŽ‰

#593