-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwiftyDefaults.podspec
More file actions
52 lines (44 loc) · 1.74 KB
/
Copy pathSwiftyDefaults.podspec
File metadata and controls
52 lines (44 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# Be sure to run `pod lib lint SwiftyDefaults.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = "SwiftyDefaults"
s.version = "1.1.0"
s.summary = "SwiftyDefaults provides accessing to NSUserDefaults using property."
s.description = <<-DESC
SwiftyDefaults provides accessing to NSUserDefaults using property.
```swift
import SwiftyDefaults
class MyDefaults: SwiftyDefaults {
dynamic var value1: String? = nil
dynamic var value2: String = "Some value"
dynamic var value3: Int = 1
dynamic var value4: Person? = nil // Person class conforms to NSCoding procotol
}
let md = MyDefaults()
print("Value1: \(md.value1)") // nil
print("Value2: \(md.value2)") // "Some value"
print("Value3: \(md.value3)") // 1
print("Value4: \(md.value4)") // nil
md.value1 = "Some another value"
md.value2 = "Some another value 2"
md.value3 = 10
md.value4 = Person(firstName: "Elvis", lastName: "Presley", age: 42)
print("Value1: \(md.value1)") // Optional("Some another value")
print("Value2: \(md.value2)") // "Some an0ther value 2"
print("Value3: \(md.value3)") // 10
print("Value4: \(md.value4)") // Optional(Person=(Optional("Elvis"), Optional("Presley"), 42))
```
DESC
s.homepage = "https://github.com/KoNEW/SwiftyDefaults"
s.license = 'MIT'
s.author = { "Vladimir Konev" => "konev.vn@gmail.com" }
s.source = { :git => "https://github.com/KoNEW/SwiftyDefaults.git", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
end