Latest 4.0.0
Homepage https://github.com/VinceBurn/SwiftyPlist
License MIT
Platforms ios 8.0, requires ARC
Authors

SwiftyPlist License MIT

Badge w/ Version
Badge w/ Platform

Note

For now this repo is a personal exercise in implementing in a TDD manner a Plist representation inspired by PropertyList which is inspired by SwiftyJSON

Swift 4.0 introduced the Codable protocol, that can be use with JSON, but that can also be used with property list. Moving forward you should look into that option.

Usage

let inputDic = plistDictionaryFromFile()
var plist = Plist(plistObject: inputDic)
let str = plist["array"]?[1].string
let float = plist["float"]?.number as? Float
plist["float"] = 1.1

Current Philosophy

This may change after starting using it in real life situation

  • Avoid all the type casting needed when using the Appel’s API alone
  • Allow chained subscript access to items in the property list
  • Keep the optional nature of dictionary access
  • Keep the out of bound crash of array access
  • Assume that the plist format is known by the calling code (e.g. what kind of number you are suppose to have for a given key)
  • Keep Plist a struct to have better control over mutability and have value semantic.
  • Version number match Swift version. e.g. Version 1.2.x are version written for Swift 1.2.

Requirements

iOS 8.0 (might work on OSX and iOS 7, but not tested (officially supported) on those system)

Installation

SwiftyPlist is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "SwiftyPlist"

Author

Vincent Bernier

Latest podspec

{
    "name": "SwiftyPlist",
    "version": "4.0.0",
    "summary": "A Plist representation in Swift",
    "description": "A Plist representation inspired by PropertyList which is inspired by SwiftyJSON.",
    "homepage": "https://github.com/VinceBurn/SwiftyPlist",
    "license": "MIT",
    "authors": {
        "Vincent Bernier": "[email protected]"
    },
    "source": {
        "git": "https://github.com/VinceBurn/SwiftyPlist.git",
        "tag": "4.0.0"
    },
    "social_media_url": "https://twitter.com/2000Bernier",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This