File tree Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ RxContacts is a [RxSwift](https://github.com/ReactiveX/RxSwift) wrapper around t
8
8
[ ![ Platform] ( https://img.shields.io/cocoapods/p/RxContacts.svg?style=flat-square )] ( http://cocoapods.org/pods/RxContacts )
9
9
[ ![ Swift Package Manager] ( https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg?style=flat-square )] ( https://github.com/apple/swift-package-manager )
10
10
[ ![ Carthage compatible] ( https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat-square )] ( https://github.com/Carthage/Carthage )
11
- [ ![ CocoaPods compatible] ( https://img.shields.io/cocoapods/v/RxContacts.svg?style=flat-square )] ( https://cocoapods.org/pods/RxContacts )
12
11
13
12
## Requirements
14
13
@@ -90,3 +89,48 @@ If you prefer not to use either of the aforementioned dependency managers, you c
90
89
91
90
## Get started
92
91
92
+
93
+ ``` swift
94
+
95
+ import RxContacts
96
+
97
+ store.rx .requestAccess (for : CNEntityType.contacts ).subscribe { (event) in
98
+ switch event{
99
+ case .next (let bool):
100
+ break
101
+ case .error (let error):
102
+ break
103
+ case .completed :
104
+ break
105
+ }
106
+ }
107
+
108
+ ```
109
+
110
+ Notifications
111
+
112
+ ``` swift
113
+
114
+ // Posted notifications when changes occur in another CNContactStore.
115
+
116
+ store.rx .didChange ().subscribe { (event) in
117
+
118
+ }
119
+
120
+ ```
121
+
122
+
123
+
124
+ Methods
125
+
126
+ ``` swift
127
+
128
+ unifiedContacts (matching predicate: NSPredicate, keysToFetch keys: [CNKeyDescriptor])
129
+ unifiedContact (withIdentifier identifier: String , keysToFetch keys: [CNKeyDescriptor])
130
+ groups (matching predicate: NSPredicate? )
131
+ containers (matching predicate: NSPredicate? )
132
+ enumerateContacts (with fetchRequest: CNContactFetchRequest)
133
+ execute (_ saveRequest: CNSaveRequest)
134
+
135
+
136
+ ```
You can’t perform that action at this time.
0 commit comments