SwiftyConfiguration from kyo__hei provides a clean Swift based API for working with your Plist files.
With SwiftyConfiguration you simply define the values within your Plist files within an extension, and then you can access the plist file values directly using the included get function.
After defining your Plist file in Swift you can access the keys like in this example for the readme:
let config = Configuration(plistPath: plistPath)!
// You can get a plist value to type-safe.
let stringValue = config.get(.string)!
let urlValue = config.get(.url)!
let numberValue = config.get(.number)!
let intValue = config.get(.int)!
let floatValue = config.get(.float)!
let doubleValue = config.get(.double)!
let dateValue = config.get(.date)!
let boolValue = config.get(.bool)!
let arrayValue = config.get(.array)!
let dictionaryValue = config.get(.dictionary)!
let innerIntValue = config.get(.innerInt)!
let innerArrayValue = config.get(.innerArray)!
let innerStringValue = config.get(.innerString)!
You can find SwiftyConfiguration on Github here.
A nice simple way to access Plist file values in Swift.
Original article: SwiftyConfiguration – Library Providing A Simple Swift Based Syntax For Accessing PList Values
©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.
Reference source: iOS App Dev Libraries, Controls, Tutorials, Examples and Tools