Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. # CloudKit and Core Data
  2.  
  3. * Core Data and CloudKit are conceptually similar but implemented in very different ways.
  4. * You can now check a use CloudKit checkbox when you add Core Data to your app.
  5. * You need to add the iCloud and Background mode capabilities yourself in order to use CloudKit and update your app in the background.
  6. * Xcode creates a container identifier for your app.
  7. * `NSPersistentCloudKitContainer` managed persistent stores that sync data too iCloud. The CloudKit container is a subclass of the `NSPersistentContainer`.
  8. * The CloudKit container contains all the boilerplate code that you would normally have to write yourself.
  9. * Apple asks for feedback on this container explicitly.
  10. * CloudKit container creates a local replica of the CloudKit store.
  11. * You can add separate stores for cloud and non-cloud synced entities. You can use persistent store descriptions to tell the container which stores it manages.
  12. * A persistent CloudKit container can share data across multiple applications by creating a shared sqlite file.
  13. * The container understands how to optimize certain CloudKit storage aspects, for instance, it's able to use either an asset or plain string to store text of variable length.
  14. * One to many relationships do not use ckreference because there is a limit of 750 references for an item. Instead they use UUIDs so they have unlimited references.
  15. * Many to many relationships are implemented through a linking table.
  16. * When modeling for collaboration and you have a textfield, you might want to use a to many relationship for the textfield content so conflicts can't happen (as easily).
  17.  
  18. Worth watching, documentation is updated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement