https://github.com/fromatom/hari
https://github.com/fromatom/hari
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fromatom/hari
- Owner: FromAtom
- License: mit
- Created: 2018-11-27T07:55:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T06:16:05.000Z (over 1 year ago)
- Last Synced: 2025-04-20T20:46:14.716Z (about 1 year ago)
- Language: Swift
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hari
## Usage
```swift
import Hari
enum HariKeys: String, HariKey {
case someKeyName1
case someKeyName2
}
Hari.shared.setup(suiteName: "com.example.app.group", bundleID: "com.example.app")
// do-catch pattern
do {
let value = try Hari.shared.bool(forKey: HariKeys.someKeyName1)
print(value)
} catch let error {
print(error)
}
// optional return value pattern
let value2 = Hari.shared.bool(forKey: HariKeys.someKeyName2)
```