CloudKit is a cloud service solution launched by Apple, specifically crafted for developers, aimed at efficiently and swiftly implementing the storage of application data in iCloud, thereby providing users with cloud storage and multi-device sharing services for their data. For small and medium-sized developers, CloudKit offers a powerful feature for their applications with almost no additional cost. This is also one of the significant distinctions between Apple’s ecosystem and other platforms.
CloudKit offers three different services: storing structured data through the CloudKit API, storing file data, and storing key-value data. Here, I have compiled some articles I wrote, explaining how to integrate CloudKit into applications.
Core Data with CloudKit
- Core Data with CloudKit: The Basics
Core Data with CloudKit brings cloud storage and multi-device synchronization capabilities to Core Data applications. This article will introduce the basic knowledge of it.
- Core Data with CloudKit: Syncing Local Database to iCloud Private Database
In this article, we will explore the most common scenario in Core Data with CloudKit applications—synchronizing the local database with the iCloud private database.
- Core Data with CloudKit: Exploring the CloudKit Dashboard
This article explores the CloudKit dashboard.
- Core Data with CloudKit: Troubleshooting
This article discusses some common issues encountered in developing Core Data with CloudKit projects, aiming to help everyone avoid detours and pitfalls.
- Core Data with CloudKit: Synchronizing Public Database
This article will introduce how to synchronize a public database to the local environment, creating a local Core Data database mirror using Core Data with CloudKit.
- Core Data with CloudKit: Sharing Data in the iCloud
In this article, we will explore how to create applications that share data with multiple iCloud users using Core Data with CloudKit.
- Switching Core Data Cloud Sync Status in Real-Time
Core Data with CloudKit itself does not offer an option to enable or disable cloud synchronization in real-time. This article will attempt to propose a solution to this issue.
Cloud Document Service.
- In-Depth Guide to iCloud Documents: Fundamental Setup and File Operations
In this article, we will discuss how to integrate iCloud Documents into applications, perform file read and write operations, and respond to changes in file content.
- Advanced iCloud Documents: Understanding Placeholder Files, Space Optimization, and Operational Techniques
In this article, we will discuss the unique characteristics of the iCloud Documents folder, the importance and applications of placeholder files, and we will also explore tips and techniques related to file operations and debugging.
Cloud Key-Value Data Storage Service.
A cloud-based service similar to UserDefaults.
- Using NSUbiquitousKeyValueStore with SwiftUI
NSUbiquitousKeyValueStore is an official solution provided by Apple for sharing key-value data across devices. This article offers a simple introduction to its usage, focusing on how to conveniently use NSUbiquitousKeyValueStore in SwiftUI.