Skip to content

platadani/CloudSyncStatusView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iCloud Sync Status View

This component provides an elegant and functional view to display the iCloud synchronization status in iOS applications using SwiftData or CoreData with iCloud sync.

Features

  • Displays the current sync status (Unknown, Syncing, Synced, Error)
  • Automatically updates based on NSPersistentCloudKitContainer notifications
  • Modern and easily customizable design
  • SwiftUI compatible
  • Works with both SwiftData and CoreData

Installation

  1. Add the CloudSyncStatusView.swift file to your Xcode project.
  2. Ensure your project has iCloud and CloudKit capabilities enabled.

Usage

import SwiftUI

struct ContentView: View {
    @StateObject private var cloudKitSyncMonitor = CloudKitSyncMonitor()
    
    var body: some View {
        VStack {
            CloudSyncStatusView(syncMonitor: cloudKitSyncMonitor)
        }
    }
}

Customization

You can easily customize the appearance of the view by modifying the styles in the CloudSyncStatusView struct.

View

iCloud Syncing Status
iCloud Syncing Status View

iCloud Sync Status
iCloud Sync Status View

Contributions

Contributions are welcome. Please open an issue or submit a pull request to suggest changes or improvements.

About

CloudSyncStatusView + CloudKitSyncMonitor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages