Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CloudKit First Take

jsa :~
November 14, 2014

CloudKit First Take

My first experience on CloudKit.

jsa :~

November 14, 2014
Tweet

More Decks by jsa :~

Other Decks in Programming

Transcript

  1. The problem The problem I want to solve is in

    our app (3DPIPO), we have right now 500MB+ 3D model assets. One 3D model takes from 5MB to 10MB based on the texture and resolution of the model. Each Model is around 5~10MB.
  2. The Podcast Everyone needs some motiviation. After hearing Ray Wanderlich's

    podcast, I tried CloudKit this morning using defaut sample. As version 2.0 (2014-0-13) https://developer.apple.com/library/ prerelease/ios/samplecode/CloudAtlas/ Introduction/Intro.html#//apple_ref/doc/ uid/TP40014599
  3. The Setup I can set up with only a few

    catch like creating application specific Record Type like ReferenceItems and ReferenceSubitems. Looks like other Record Type are created automatically but not these two. ReferenceItems has attribute name as String ReferenceSubitem has attribute parent as Reference, and name as String
  4. The Catch For Photos and Users record types, you have

    to create a bogy attribute to make the queriable in PUBLIC DATA.
  5. The result In the end my iCloud dashboard looks like

    Items (2 attributes, location as Location, and name as String) Photos (2 attributes, photo as Asset, bogy as Queriable) User (1 attributes, boggy as Queriable) Now you can head to User Records and Default Zone in PUBLIC DATA The rest of the problem is data versioning.
  6. Tips for Defining Your App's Record Types » Organize your

    records around a central record type. » Use references to create strong relationships between records. » Include version information in your records. » Handle missing keys gracefully in your code. » Avoid complex graphs of records.
  7. Reference Designing for CloudKit The problem now is the Data

    Transfer quota. The 25MB/day for assets worries me. Ray Wenderlich's Beginning CloudKit CKAssets Sample Code Cloud Captions