{"id":245,"date":"2015-05-03T06:30:27","date_gmt":"2015-05-03T10:30:27","guid":{"rendered":"http:\/\/www.snipnotes.de\/?p=245"},"modified":"2015-05-15T10:05:39","modified_gmt":"2015-05-15T14:05:39","slug":"snipnotes-in-detail-keeping-your-devices-in-sync","status":"publish","type":"post","link":"https:\/\/www.snipnotes.de\/en\/snipnotes-in-detail-keeping-your-devices-in-sync\/","title":{"rendered":"SnipNotes in detail: Keeping your devices in sync"},"content":{"rendered":"<p>Welcome to\u00a0&#8220;SnipNotes in detail&#8221; &#8211; a new series of blog posts where I want to give you a detailed\u00a0look at\u00a0some of SnipNotes&#8217; more\u00a0subtle\u00a0features\u00a0and how they work behind the scenes. Today&#8217;s post is all about iCloud synchronization. How does it work? Is your data safe? Read on to find out.<!--more--><\/p>\n<p>Nowadays many people use more than one device. I personally own an iPhone and two iPads, which I all use on a regular basis. Consequently an important aspect of nearly any app is to provide some cloud connectivity, so that users can synchronize data between their devices. On the other hand the stored data must be protected from unauthorized access, which basically limits the possible storage locations to well known storage providers like iCloud or Dropbox &#8211; No user wants to store data on some developer&#8217;s private server after all.<\/p>\n<p>SnipNotes uses iCloud as a storage provider. More specifically, it uses CloudKit, an interface that enables developers to store app data on Apple&#8217;s iCloud servers. CloudKit saves all data into the user&#8217;s personal iCloud account, so it cannot be accessed by the developer or other users. It also creates a separate container for every app that uses the\u00a0service. This way the data can only be accessed by the associated\u00a0app. The following diagram illustrates this concept:<\/p>\n<figure id=\"attachment_246\" aria-describedby=\"caption-attachment-246\" style=\"width: 625px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.snipnotes.de\/en\/wp-content\/uploads\/2015\/05\/iCloud-containers.png\"><img decoding=\"async\" class=\"wp-image-246 size-large lazyload\" data-src=\"http:\/\/www.snipnotes.de\/en\/wp-content\/uploads\/2015\/05\/iCloud-containers-1024x519.png\" alt=\"iCloud containers\" width=\"625\" height=\"317\" data-srcset=\"https:\/\/www.snipnotes.de\/en\/wp-content\/uploads\/2015\/05\/iCloud-containers-1024x519.png 1024w, https:\/\/www.snipnotes.de\/en\/wp-content\/uploads\/2015\/05\/iCloud-containers-300x152.png 300w, https:\/\/www.snipnotes.de\/en\/wp-content\/uploads\/2015\/05\/iCloud-containers-624x316.png 624w, https:\/\/www.snipnotes.de\/en\/wp-content\/uploads\/2015\/05\/iCloud-containers.png 1181w\" data-sizes=\"(max-width: 625px) 100vw, 625px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 625px; --smush-placeholder-aspect-ratio: 625\/317;\" \/><\/a><figcaption id=\"caption-attachment-246\" class=\"wp-caption-text\">Source: Apple<\/figcaption><\/figure>\n<p>When you open SnipNotes for the first time, it checks for an active iCloud account and downloads\u00a0any existing snippets. Every time you save a new one, the data is stored locally and put onto a queue. Afterwards SnipNotes tries to synchronize itself with iCloud and upload your new snippet. This process can fail of course, e.g. if you have no cellular reception or the iCloud servers are unavailable. In this case the data stays on the queue and will be processed the next time your app communicates with iCloud. This happens on three occasions:<\/p>\n<ul>\n<li>Every time you open the app or the widget<\/li>\n<li>When you pull down the snippet list to refresh<\/li>\n<li>When you create a new snippet in the app or in the widget<\/li>\n<\/ul>\n<p>The queue mechanismen ensures that the app&#8217;s local and iCloud data are always synchronized and no snippet is left behind! There is also a queue for deleted snippets, which works the same way.<\/p>\n<p>Of course this is just the beginning. SnipNotes&#8217; cloud features will be greatly enhanced in the coming months, when more features and platforms are added. Stay tuned and thanks for reading!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to\u00a0&#8220;SnipNotes in detail&#8221; &#8211; a new series of blog posts where I want to give you a detailed\u00a0look at\u00a0some of SnipNotes&#8217; more\u00a0subtle\u00a0features\u00a0and how they work behind the scenes. Today&#8217;s post is all about iCloud synchronization. How does it work? Is your data safe? Read on to find out.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-245","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":5,"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/posts\/245\/revisions\/287"}],"wp:attachment":[{"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.snipnotes.de\/en\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}