Fix Bool in plist generation. (#1827)

* Fix Bool in plist generation.

* Edit changelog.
This commit is contained in:
Marek Fořt 2020-09-27 19:54:28 +02:00 committed by GitHub
parent 493cf13d3f
commit 4ffce765c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Please, check out guidelines: https://keepachangelog.com/en/1.0.0/
- Ensure `DEVELOPER_DIR` is used in all `swiftc` calls [#1819](https://github.com/tuist/tuist/pull/1819) by [@kwridan](https://github.com/kwridan)
- Fixed decoding bug on DefaultSettings [#1817](https://github.com/tuist/tuist/issues/1817) by [@jakeatoms](https://github.com/jakeatoms)
- Bool compiler error when generating accessor for plists [#1827](https://github.com/tuist/tuist/pull/1827) by [@fortmarek](https://github.com/fortmarek)
### Added

View File

@ -60,6 +60,8 @@ extension SynthesizedResourceInterfaceTemplates {
{% empty %}
:
{% endfor %}]
{% elif metadata.type == "Bool" %}
Bool(truncating: {{ value }})
{% else %}
{{ value }}
{% endif %}

View File

@ -2,7 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>my_bool_key</key>
<false/>
<key>my_key</key>
<string>This is my secret key!</string>
</dict>
</plist>
</plist>