Skip to content

Persistence

Lucas Nelaupe edited this page Jan 12, 2018 · 6 revisions

SwiftQueue comes with a default persister: UserDefaultsPersister that will persist your data in UserDefaults.

// If there is any serialised jobs, They will be added to the queue automatically when re-creating the SwiftQueueManager instance.
SwiftQueueManager(creators: [...], persister: UserDefaultsPersister())

// By default, jobs are not persisted. Set the flag to true to automatically persist your job.
jobBuilder.persist(required: true)

That's it.

Clone this wiki locally