A multiplatform Swift library bringing functional methods and type safety to .plist (Property List) files.
The challenges that Apple's standard PropertyListSerialization
presents:
- Lack of type safety which allows the inadvertent injection of incompatible value types, which can lead to unexpected errors when saving a plist file later on, and are difficult to diagnose
- Root-level dictionary access only, making traversal of nested dictionaries very cumbersome
- Deals in NS value types which is not very Swifty and requires extra boilerplate at every interaction
PListKit solves these issues by:
- Acting as a safe and convenient wrapper for
PropertyListSerialization
- Providing clean functional syntax for
- easily manipulating nested keys and values in dictionary trees
- loading and saving plist files
- Dealing in native Swift value types for keys and values
- Preventing the inadvertent use of incompatible value types to avoid unexpected errors due to lack of type safety
The library is available as a Swift Package Manager (SPM) package.
To add PListKit to your Xcode project:
- Select File → Swift Packages → Add Package Dependency
- Add package using
https://github.com/orchetect/PListKit
as the URL.
See the online documentation or view it in Xcode's documentation browser by selecting the Product → Build Documentation menu.
Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself @orchetect.
Licensed under the MIT license. See LICENSE for details.
Please do not email maintainers for technical support. Several options are available for issues and questions:
- Questions and feature ideas can be posted to Discussions.
- If an issue is a verifiable bug with reproducible steps it may be posted in Issues.
Contributions are welcome. Posting in Discussions first prior to new submitting PRs for features or modifications is encouraged.