cloudkit
DESCRIPTION
Talk given at NYC iOS MeetupTRANSCRIPT
CloudKit Intro
NYC iOS Meetup, 9/3/14
About me
Arun Nagarajan (@entaq)
Currently Founding Engineer, funded stealth startup in NYCWe are hiring! Email me at [email protected]
Previously2 yrs at Google - Tech Lead, Developer Platform9 yrs at Verivo Software (Boston) - VP of Architecture
What is it?
● New Cloud API that provides backend to app● Other “iCloud” options
○ iCloud Core Data○ iCloud Documents/Drive○ iCloud Key Value Store
● Transport technology○ And not a local persistence layer
● 400 million iCloud accounts● Apple used it to build iCloud Drive & Photos
Key entities
● Containers● Databases● Records● Record Zones● Record Identifiers● References● Assets
Enabling CloudKit
Some favorite features
User Discovery
● User Record ID - unique per app/per user● Email address if user opts in● Scan address book for other contacts
○ You never get address book● One new permission dialog
Salient points
● Error handling is key● NSOperation based API
○ And a convenience API● Subscriptions/Push notification is solid● Querying based on NSPredicates
○ Location based queries● Dashboard
○ https://icloud.developer.apple.com/dashboard/
Is it ready?
● For now, Apple only (iOS and Mac)● Some server unavailable errors● No way to run server side code● Plenty of other options!
○ Hard to port over for the most part
Some troubles
Cost model
● Public database quota for developer● Private database quota for users
Costs
Storage - 5gb for assets, 50mb for DBTransfer - 25mb/day assets, 250kb/day DB
For every user, you get Storage - 100mb for assets, 1mb for DBTransfer - 500kb/day assets, 5kb/day DB
Sample costs
10k usersStorage - 1tb for assets, 10gb for DBTransfer - 5gb/day assets, 50mb/day for DB
100k usersStorage - 10tb for assets, 100gb for DBTransfer - 50gb/day assets, 500mb/day for DB