Last week, we published an in-depth CloudKit tutorial on managing critical data. So, in this post, I will build on what I showed you last week by teaching you how to manage a large amount of data with CloudKit.
Tag Archives: CloudKit
In the first tutorial of this series, we explored the CloudKit framework and infrastructure. We also laid the foundation for the sample application that we’re going to build, a shopping list application. In this tutorial, we are focusing on adding, editing, and removing shopping lists.
CloudKit helps developers manage static data and almost every App needs some static data to function properly. By static data, I mean, non mutable data. Apps that use non mutable data could be:
- an App that stores information about a URL and an API key locally so that it can connect to some web service;
- a reference App, such as a dictionary or a translator, that needs to quickly access the dictionary entries in order to work offline;
- a quiz game, like a trivia App, that needs access to the questions and answers so that users can play offline.
Most of the time, these data need to be available at the application launch. So, we usually store this information in the App. However, we have an issue here: if we need to change these data for any reason, we will need to upload a new App version to the App Store. And you know, because we must wait a few days to pass the review , this process is not instantaneous. And it won’t be until our users get the update that everything will run smoothly again.
So, it seems that this is not the best process. In general, you don’t need to change the static data every time you send a new app version to the App Store. But there are some uncommon situations that require a solution as quickly as possible. For example, imagine that the API key of your app became invalid. Maybe someone hacked your account, stole the API keys and started to use them incorrectly, costing you thousands of dollars, and putting the privacy of your users at risk. In this case, we would need to reset the API key as soon as possible, but going through the review process can be killer.
Though this never should happen, it can happen. And while you’re trying to find out who hacked your account, time is passing. Your App is losing the momentum, or, worst case, not working at all. So, we have to fix it, and we have to do it now!
rief: Build a crowd-sourced song recognition app using Apple’s free platform as a service: CloudKit.
Learn: CloudKit, CKRecord, CKQuery, CKSubscription, AVAudioRecorder, and push messages
- Setting up
- Recording from the microphone with AVAudioRecorder
- Animating UIStackView subview layout
- Writing to iCloud with CloudKit: CKRecord and CKAsset
- A hands-on guide to the CloudKit dashboard
- Reading from iCloud with CloudKit: CKQueryOperation and NSPredicate
- Working with CloudKit records: CKReference, fetchRecordWithID, and saveRecord
- Delivering notifications with CloudKit push messages: CKSubscription and saveSubscription
- Wrap up
Good news everyone – we now have an official raywenderlich.com Podcast!
This podcast is focused around topics of interest for app developers and gamers. In each episode, we’ll interview a well-known developer, have some tech talk and non-tech talk, and fill you in on what’s new on the website.
The hosts for this podcast are team members Tammy Coron, Jake Gundersen, Felipe Laso Marsetti, and Mic Pringle. I will be popping in to give the “what’s new on raywenderlich.com” section, but really this is their show :]
- WatchKit with Mike Oliver – Podcast S03 E06
- Core Animation with Marin Todorov – Podcast S03 E05
- RWDevCon with Ray Wenderlich and John Wilker – Podcast S03 E04
- Mobile Design with Alli Dryer – Podcast S03 E03
- Scene Kit with David Rönnqvist – Podcast S03 E02
- Apple Pay with Erik Kerber – Podcast S03 E01
- Unit Testing with Ellen Shapiro – Podcast S02 E10
- Metal with Warren Moore – Podcast S02 E09
- CocoaPods with Orta Therox – Podcast S02 E08
- WatchKit with Ben Morrow – Podcast S02 E07
- Unity with Brian Moakley – Podcast S02 E06
- FMDB with Gus Mueller – Podcast S02 E05
- GPUImage with Brad Larson – Podcast S02 E04
- Realm with JP Simard – Podcast S02 E03
- Core Data with Saul Mora – Podcast S02 E02
- The Successful App Launch with Jeremy Olson – Podcast S02 E01
- Introducing the raywenderlich.com Podcast Season 2!
- Swift: The raywenderlich.com Podcast Episode 10
- CloudKit: The raywenderlich.com Podcast Episode 9
- Adaptive UI: The raywenderlich.com Podcast Episode 8
- WWDC Reflections: The raywenderlich.com Podcast Episode 7
- 2D Game Art: The raywenderlich.com Podcast Episode 6
- Going Indie: The raywenderlich.com Podcast Episode 5
- iOS Dev Tools: The raywenderlich.com Podcast Episode 4
- Cocoa Design Patterns: The raywenderlich.com Podcast Episode 3
- Objective-C Style and Runtime: The raywenderlich.com Podcast Episode 2
- Introducing the raywenderlich.com Podcast: Episode 1!
- Beginning Adaptive Layout Tutorial
- iOS 8 Today Extension Tutorial
- Beginning CloudKit Tutorial
- iOS 8 Visual Effects Tutorial
- How to Add Table View Search in Swift
- How To Use UIScrollView to Scroll and Zoom Content in Swift
- Text Kit Tutorial in Swift
- Beginning Core Image in Swift
- How To Make a Custom Control in Swift
- Using NSURLProtocol with Swift
- Beginning Scene Kit Tutorial
- iOS 8 Handoff Tutorial
- iOS 8 Metal Tutorial with Swift: Getting Started
- iOS 8 Metal Tutorial with Swift Part 2: Moving to 3D
This is a library for simplified access to Apple’s CloudKit data. You can use the EVCloudKitDao.swift class if you want control over your in app data and notifications. The EVCloudKitData.swift class will let you handle CloudKit data as easy as possible. As a bonus you can use the EVReflection.swift class if you want easy to use reflection methods.
See TestsViewController.swift for a complete overview of the functionality. See the Quick Help info for method descriptions. The AppMessage demo will be a complete functional messaging app based on CloudKit.
The Dao, Data and Reflection classes are complete, the demo is progressing. It has support for:
News items are fully functional. Just try adding, deleting and updating newsitems from the CloudKit dashboard.
A Contacts list based on your contacts that also have installed the app.
Chat with someone using text messages, pictures and sending your location