Sync UserDefaults to iCloud automatically. Swift 3.
A clean and simple class to sync UserDefaults to iCloud.
- Configure iCloud entitlements to use key-value storage. If you are using across apps (different bundle IDs) make sure they have the same iCloud container id.
- Drag the file to your xcode project.
- Call SwiftyiCloudSync.start(prefix) in app did finish launching. Use an app-unique prefix to avoid syncing unnecessary data.
This is a Swift 3 version of https://github.com/MugunthKumar/MKiCloudSync with some minor changes.