Skip to main content

Deleted Contacts

TBD: Тут нужно описание какие контакты попадают в корзину.

Fetch Deleted Contacts#

To fetch deleted contacts, you need to call:

CloudikeContacts.shared.recoverProcessor.getDeletedContacts { (cards, error) in    // display a list of cards and provide cards for selection}

Begin Recovering#

To recover deleted contacts, you need to call: cards - list of deleted contacts which should be recovered on the device.

CloudikeContacts.shared.recoverProcessor.recover(cards: cards) { (success, error) in }

Monitoring#

TBD: Описание прогресса рекавера, стрктура нотификаций и значение

To monitor the recover status, you need to call:

CloudikeContacts.shared.recoverProcessor.registerObserver(observer)

To cancel monitoring, you need to call:

CloudikeContacts.shared.recoverProcessor.unregisterObserver(observer)

The following example shows how to do that:

class RecoverProgressViewController: UIViewController {    override func viewWillAppear(_ animated: Bool) {        super.viewWillAppear(animated)        CloudikeContacts.shared.recoverProcessor.registerObserver(self)    }
    override func viewWillDisappear(_ animated: Bool) {        super.viewWillDisappear(animated)        CloudikeContacts.shared.recoverProcessor.unregisterObserver(self)    }}
extension RecoverProgressViewController: RecoverObserver {    func recoverStateChanged(state: RecoverProcessor.RecoverState) {        // your implementation    }    }