Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wojciech-kulik/icloud-demo
Sample iOS project showing how to implement and use iCloud services.
https://github.com/wojciech-kulik/icloud-demo
cloudkit coredata icloud ios swiftui
Last synced: 3 months ago
JSON representation
Sample iOS project showing how to implement and use iCloud services.
- Host: GitHub
- URL: https://github.com/wojciech-kulik/icloud-demo
- Owner: wojciech-kulik
- License: mit
- Created: 2021-02-09T17:05:28.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-03T11:09:28.000Z (about 1 year ago)
- Last Synced: 2023-12-03T12:23:04.525Z (about 1 year ago)
- Topics: cloudkit, coredata, icloud, ios, swiftui
- Language: Swift
- Homepage:
- Size: 38.1 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# iCloud Demo
Sample iOS project showing how to implement and use iCloud services.
## Features
- CloudKit API - simple database using CloudKit
- CloudKit + CoreData - simple database using CoreData with iCloud
- iCloud Documents - iCloud files synchronization
- Key-Value storage - UserDefaults stored in iCloud## Required Project Setup
Follow steps in this specific order. Remember, once you create an iCloud container, it can't be removed or edited, so be careful with the name.1. Open `iCloud Demo.entitlements` file and replace `iCloud.com.company.icloud-demo` with your own. It must start with `iCloud.`
2. Go to project settings, select your target, select "Signing & Capabilities".
3. Change bundle id to whatever you want.
4. Select your TEAM.
5. Open `AppConstants.swift` and replace container ID with your own.It should generate provisioning profiles and create iCloud container. If iCloud container is highlighted with red color, try to refresh it or uncheck and check again.
## Testing
Some features like CoreData automatic sync require real device. In this case, CoreData is using under the hood push notifications to track changes.## Simulator
You can also try it out on simulator, however you need to sign in with your Apple ID to enable iCloud. Also syncing is working worse than on real device, therefore sometimes you may encounter some delays.
Use `Features -> Trigger iCloud Sync` from simulator's menu to trigger synchronization.