CloudKit Intro 
NYC iOS Meetup, 9/3/14
About me 
Arun Nagarajan (@entaq) 
Currently 
Founding Engineer, funded stealth startup in NYC 
We are hiring! Email me at arun@isapp.com 
Previously 
2 yrs at Google - Tech Lead, Developer Platform 
9 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 DB 
Transfer - 25mb/day assets, 250kb/day DB 
For every user, you get 
Storage - 100mb for assets, 1mb for DB 
Transfer - 500kb/day assets, 5kb/day DB
Sample costs 
10k users 
Storage - 1tb for assets, 10gb for DB 
Transfer - 5gb/day assets, 50mb/day for DB 
100k users 
Storage - 10tb for assets, 100gb for DB 
Transfer - 50gb/day assets, 500mb/day for DB
Thanks 
Questions? 
Arun Nagarajan 
arun@isapp.com

CloudKit

  • 1.
    CloudKit Intro NYCiOS Meetup, 9/3/14
  • 2.
    About me ArunNagarajan (@entaq) Currently Founding Engineer, funded stealth startup in NYC We are hiring! Email me at arun@isapp.com Previously 2 yrs at Google - Tech Lead, Developer Platform 9 yrs at Verivo Software (Boston) - VP of Architecture
  • 3.
    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
  • 4.
    Key entities ●Containers ● Databases ● Records ● Record Zones ● Record Identifiers ● References ● Assets
  • 5.
  • 6.
  • 7.
    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
  • 8.
    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/
  • 9.
    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
  • 10.
  • 11.
    Cost model ●Public database quota for developer ● Private database quota for users
  • 12.
    Costs Storage -5gb for assets, 50mb for DB Transfer - 25mb/day assets, 250kb/day DB For every user, you get Storage - 100mb for assets, 1mb for DB Transfer - 500kb/day assets, 5kb/day DB
  • 13.
    Sample costs 10kusers Storage - 1tb for assets, 10gb for DB Transfer - 5gb/day assets, 50mb/day for DB 100k users Storage - 10tb for assets, 100gb for DB Transfer - 50gb/day assets, 500mb/day for DB
  • 14.
    Thanks Questions? ArunNagarajan arun@isapp.com