Skip to content

Commit 715527d

Browse files
2 parents cea1a58 + 15f2911 commit 715527d

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ RxContacts is a [RxSwift](https://github.com/ReactiveX/RxSwift) wrapper around t
88
[![Platform](https://img.shields.io/cocoapods/p/RxContacts.svg?style=flat-square)](http://cocoapods.org/pods/RxContacts)
99
[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg?style=flat-square)](https://github.com/apple/swift-package-manager)
1010
[![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)
1211

1312
## Requirements
1413

@@ -90,3 +89,48 @@ If you prefer not to use either of the aforementioned dependency managers, you c
9089

9190
## Get started
9291

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+
```

0 commit comments

Comments
 (0)