Slide 1

Slide 1 text

CLOUDKIT Why did I not use it earlier?

Slide 2

Slide 2 text

aNdrOid

Slide 3

Slide 3 text

How many of you have or had an app idea?

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

IDEA

Slide 6

Slide 6 text

PLAN IDEA

Slide 7

Slide 7 text

PLAN TEAM IDEA

Slide 8

Slide 8 text

THE HONEYMOON PERIOD

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

• Why CloudKit • How to integrate • What are the best practices

Slide 11

Slide 11 text

WHY CLOUDKIT • The free quota • Pagination • Sync across all devices • Scales with your user base • No auth required to save personal data • Notifications setup made easy with CKSubscriptions • One of the best in class infrastructure • Uploading images, video, audio or any data, is so easy.

Slide 12

Slide 12 text

WHY CLOUDKIT • The free quota • Pagination • Sync across all devices • Scales with your user base • No auth required to save personal data • Notifications setup made easy with CKSubscriptions • One of the best in class infrastructure • Uploading images, video, audio or any data, is so easy. I got 99 problems, but a dependency ain’t one “ - Jay-Z

Slide 13

Slide 13 text

HOW TO INTEGRATE IT

Slide 14

Slide 14 text

HOW TO INTEGRATE IT • Checkbox Approach • Step 1: Check the box • Step 2: Save all data to CoreData

Slide 15

Slide 15 text

HOW TO INTEGRATE IT • Checkbox Approach • Step 1: Check the box • Step 2: Save all data to CoreData

Slide 16

Slide 16 text

HOW TO INTEGRATE IT • Checkbox Approach • Step 1: Check the box • Step 2: Save all data to CoreData • Non checkbox approach • Convert your NSManagedObject to a CKRecord • Upload the record(s) using one of the APIs

Slide 17

Slide 17 text

HOW TO INTEGRATE IT • Checkbox Approach • Step 1: Check the box • Step 2: Save all data to CoreData • Non checkbox approach • Convert your NSManagedObject to a CKRecord • Upload the record(s) using one of the APIs

Slide 18

Slide 18 text

SAMPLE CODE

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

ACCESSING CONTAINERS

Slide 21

Slide 21 text

SETTING UP YOUR CUSTOM ZONE

Slide 22

Slide 22 text

SETTING UP SUBSCRIPTIONS

Slide 23

Slide 23 text

CURSORS FOR PAGINATION

Slide 24

Slide 24 text

FETCHING CUSTOM ZONE CHANGES

Slide 25

Slide 25 text

App Container 1 Container 2 Container 3 Private Database Public Database Default Zone Default Zone Custom Zones Custom Zone 1 Custom Zone 2 App App Shared Database

Slide 26

Slide 26 text

THE BEST PRACTICES • Refer WWDC videos • Custom Zones >>>>> Default Zones • CKSubscriptions be smart about using them • CKQueryCursor • Make bulk uploads • Listen to the errors, they are extremely handy • Write a wrapper over CloudKit api’s so you can easily replace it • Do not perform nested CloudKit calls • CloudKit should be called minimal times, always store the data offline

Slide 27

Slide 27 text

THINGS I HATE ABOUT CLOUDKIT • The checkbox option, does not allow you to customise • Missing out on android • CloudKit Dashboard gives no analytics

Slide 28

Slide 28 text

@mufasaYC twitter | instagram Lingo - Pocket English School Powered by CloudKit

Slide 29

Slide 29 text

@mufasaYC twitter | instagram Lingo - Pocket English School Powered by CloudKit