<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>CloudKit on Andrew Bancroft</title>
    <link>https://www.andrewcbancroft.com/tags/cloudkit/</link>
    <description>Recent content about iOS development with Swift in CloudKit  from Andrew Bancroft.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 30 Apr 2019 10:03:33 +0000</lastBuildDate>
    
        <atom:link href="https://www.andrewcbancroft.com/tags/cloudkit/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>iOS Data Persistence: The Big Picture</title>
      <link>https://www.andrewcbancroft.com/2019/04/30/ios-data-persistence-the-big-picture/</link>
      <pubDate>Tue, 30 Apr 2019 10:03:33 +0000</pubDate>
      
      <guid>https://www.andrewcbancroft.com/2019/04/30/ios-data-persistence-the-big-picture/</guid>
      <description>&lt;p&gt;We&amp;rsquo;ve all been there. Do a search on the topic of &amp;ldquo;saving data in iOS” and you&amp;rsquo;ll get &lt;em&gt;dozens&lt;/em&gt; of search results mentioning at least six different frameworks and platforms, and a month’s worth of reading.&lt;/p&gt;
&lt;p&gt;Wouldn&amp;rsquo;t it be nice to distill the possibilities down into &lt;em&gt;just what you need&lt;/em&gt; in order to start down a path for persisting data in your app?&lt;/p&gt;
&lt;p&gt;&amp;ldquo;&lt;a href=&#34;http://bit.ly/ios-data-persistence-bp&#34;&gt;iOS Data Persistence: The Big Picture&lt;/a&gt;” will be worth the hour of your time.&lt;/p&gt;
&lt;div class=&#34;resources&#34;&gt;
  &lt;div class=&#34;resources-header&#34;&gt;
    Resources
  &lt;/div&gt;
  &lt;ul class=&#34;resources-content&#34;&gt;
    &lt;li&gt;
      &lt;i class=&#34;fas fa-video&#34;&gt;&lt;/i&gt; &lt;a href=&#34;http://bit.ly/ios-data-persistence-bp&#34; target=&#34;_blank&#34;&gt;iOS Data Persistence: The Big Picture&lt;/a&gt;&lt;a href=&#34;http://bit.ly/ios-data-persistence-bp&#34; target=&#34;_blank&#34;&gt;&lt;br /&gt; &lt;img src=&#34;https://www.andrewcbancroft.com/wp-content/uploads/2019/04/ios-data-persistence-big-picture.001-1024x576.png&#34; alt=&#34;iOS Data Persistence: The Big Picture&#34; width=&#34;1024&#34; height=&#34;576&#34; class=&#34;alignnone size-large wp-image-13737&#34; srcset=&#34;https://www.andrewcbancroft.com/wp-content/uploads/2019/04/ios-data-persistence-big-picture.001-1024x576.png 1024w, https://www.andrewcbancroft.com/wp-content/uploads/2019/04/ios-data-persistence-big-picture.001-300x169.png 300w, https://www.andrewcbancroft.com/wp-content/uploads/2019/04/ios-data-persistence-big-picture.001-768x432.png 768w, https://www.andrewcbancroft.com/wp-content/uploads/2019/04/ios-data-persistence-big-picture.001.png 1280w&#34; sizes=&#34;(max-width: 1024px) 100vw, 1024px&#34; /&gt;&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
&lt;h1 id=&#34;course-outline&#34;&gt;Course Outline&lt;/h1&gt;
&lt;p&gt;During this one hour course, you will learn the &lt;em&gt;reasons&lt;/em&gt; for saving data to help ground you as you begin to traverse the data persistence landscape.&lt;/p&gt;
&lt;p&gt;You will discover how to use technologies like &lt;strong&gt;User Defaults&lt;/strong&gt; and &lt;strong&gt;Property Lists&lt;/strong&gt;, and I will guide you on how to work with Swift’s &lt;strong&gt;Encodable&lt;/strong&gt; and &lt;strong&gt;Decodable&lt;/strong&gt; protocols.&lt;/p&gt;
&lt;p&gt;You will understand what you’re getting into if you choose to work with &lt;strong&gt;SQLite&lt;/strong&gt;, &lt;strong&gt;Core Data&lt;/strong&gt;, or &lt;strong&gt;Realm Database&lt;/strong&gt; for local data persistence.&lt;/p&gt;
&lt;p&gt;You will know how it feels to reach for a remote data storage option like &lt;strong&gt;CloudKit&lt;/strong&gt;, &lt;strong&gt;Realm Platform&lt;/strong&gt;, or &lt;strong&gt;Firebase&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Finally, you will see a clear picture of what it’s like to design a &lt;strong&gt;document-based application&lt;/strong&gt; and integrate your app’s data with the &lt;strong&gt;iOS Files app&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When you’re finished with this course, you will have the skills and knowledge you need to make an informed decision about putting a reliable data storage plan for your iOS app into action.&lt;/p&gt;
&lt;h2 id=&#34;1--establishing-the-data-persistence-landscape&#34;&gt;1 – Establishing the Data Persistence Landscape&lt;/h2&gt;
&lt;p&gt;During the course, you will have the opportunity to experience a variety of data persistence scenarios and technologies.&lt;/p&gt;
&lt;p&gt;You’ll get general feel for setup requirements and a taste of what it’s like to work with each solution in code.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To start you off on the right footing, this module will establish the data persistence possibilities and focus in on the &lt;em&gt;reasons&lt;/em&gt; for saving data so that you&amp;rsquo;re persisting with a purpose.&lt;/li&gt;
&lt;li&gt;You will be introduced to a player profile matrix to help you analyze your data persistence options from a number of angles.&lt;/li&gt;
&lt;li&gt;Finally, you will get the feel for working with the Swift &lt;code&gt;Encodable&lt;/code&gt; and &lt;code&gt;Decodable&lt;/code&gt; protocols.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2--saving-settings-and-configuration&#34;&gt;2 – Saving Settings and Configuration&lt;/h2&gt;
&lt;p&gt;Users are picky, aren’t they? Everybody has preferences though, so it’s no wonder that you as a developer are often tasked with letting your users to customize their experience within your app.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You will learn how to manage user preferences with the &lt;code&gt;UserDefaults&lt;/code&gt; system that&amp;rsquo;s built in to iOS&lt;/li&gt;
&lt;li&gt;Next, you will explore synchronizing settings with iCloud Key-Value Store&lt;/li&gt;
&lt;li&gt;Finally, you will understand how to ship configuration for your app with Property Lists that are included in your application bundle&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;4--saving-objects-and-object-graphs&#34;&gt;4 – Saving Objects and Object Graphs&lt;/h2&gt;
&lt;p&gt;What if you only wanted to load a subset of the data into memory instead of being locked in to an all-or-nothing situation with &lt;code&gt;UserDefaults&lt;/code&gt; or Property Lists?&lt;/p&gt;
&lt;p&gt;What if you needed to save a more complex data model that includes relationships?&lt;/p&gt;
&lt;p&gt;For that, you’ll need to know about saving and sharing objects and object graphs…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Six Technologies/Frameworks&lt;/strong&gt; will be featured in this module:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SQLite&lt;/li&gt;
&lt;li&gt;Core Data&lt;/li&gt;
&lt;li&gt;Realm Database&lt;/li&gt;
&lt;li&gt;CloudKit&lt;/li&gt;
&lt;li&gt;Realm Platform&lt;/li&gt;
&lt;li&gt;Firebase&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal is to help you answer &lt;strong&gt;two questions&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;“What am I getting myself into if I pick one persistence technology over another?”&lt;/li&gt;
&lt;li&gt;“How does it feel to work with this persistence technology in code?”&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You will answer these questions by…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Scanning the arena of persistence options and explore what sets these technologies apart from &lt;code&gt;UserDefaults&lt;/code&gt; and Property Lists.&lt;/li&gt;
&lt;li&gt;Surveying the setup process to see what it takes to get up and running with each technology in the list&lt;/li&gt;
&lt;li&gt;Exploring the data modeling process to wrap your head around what the data structure design process is like for each technology in the list&lt;/li&gt;
&lt;li&gt;Getting the feel for working with data so that you understand what it&amp;rsquo;s like to create objects, update them, delete them, query and filter them, and watch for data changes so that you can update your user interface appropriately&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;5--saving-data-as-documents-and-files&#34;&gt;5 – Saving Data as Documents and Files&lt;/h2&gt;
&lt;p&gt;What if you need to encapsulate chunks of content together and save it all as a packaged up file…as a single unit with a custom file extension?&lt;/p&gt;
&lt;p&gt;For that, you need to know about saving data as documents and files.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You will explore the use-case for building a &amp;ldquo;document-based application”&lt;/li&gt;
&lt;li&gt;Next you will walk through designing a document as a subclass of &lt;code&gt;UIDocument&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;You will learn to create and load documents from a Document Browser&lt;/li&gt;
&lt;li&gt;Customizing your app&amp;rsquo;s file extension is a key step that you will work through&lt;/li&gt;
&lt;li&gt;You will spend some time understanding how to interact with document data in code as &lt;em&gt;users&lt;/em&gt; interact with the user interface&lt;/li&gt;
&lt;li&gt;Finally, you will answer the question, “How do I get my app’s files to show up in the iOS Files app?”&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;feedback-welcome&#34;&gt;Feedback Welcome!&lt;/h1&gt;
&lt;p&gt;My goal is to help you filter the noise… to help you distill an overwhelming amount of information down into the big picture possibilities so that you’re on a trajectory for being able to make an informed decision about putting a reliable data storage plan for your iOS app into action.&lt;/p&gt;
&lt;p&gt;I welcome feedback on this course, and on other iOS development courses you might be interested in seeing in the Pluralsight library. Happy learning!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>CloudKit Fundamentals</title>
      <link>https://www.andrewcbancroft.com/2018/09/24/cloudkit-fundamentals/</link>
      <pubDate>Mon, 24 Sep 2018 17:58:49 +0000</pubDate>
      
      <guid>https://www.andrewcbancroft.com/2018/09/24/cloudkit-fundamentals/</guid>
      <description>&lt;p&gt;At the core of developing a seamless and collaborative data sharing experience for Apple’s platforms is a thorough knowledge of CloudKit.&lt;/p&gt;
&lt;p&gt;In this course, you’ll learn to leverage Apple’s flagship framework to achieve your app’s remote data storage and data sharing requirements.&lt;/p&gt;
&lt;p&gt;First, you’ll learn how to configure CloudKit in your Xcode project and how to save, query, update, and delete data that your users store in iCloud.&lt;/p&gt;
&lt;p&gt;Next, you’ll explore how to synchronize data across a user’s devices.&lt;/p&gt;
&lt;p&gt;Finally, you’ll discover how to handle CloudKit errors, test your app on physical devices, and deploy to production.&lt;/p&gt;
&lt;p&gt;When you’re finished with this course, you’ll have a foundational knowledge of CloudKit that will help you provide a fluid, interactive data sharing experience.&lt;/p&gt;
&lt;h1 id=&#34;course-trailer&#34;&gt;Course Trailer&lt;/h1&gt;
&lt;p&gt;You can check out a trailer of the course over at Pluralsight completely free.&lt;/p&gt;
&lt;div class=&#34;resources&#34;&gt;
  &lt;div class=&#34;resources-header&#34;&gt;
    Resources
  &lt;/div&gt;
  &lt;ul class=&#34;resources-content&#34;&gt;
    &lt;li&gt;
      &lt;i class=&#34;fas fa-video&#34;&gt;&lt;/i&gt; &lt;a href=&#34;http://bit.ly/cloudkit-fundamentals&#34; target=&#34;_blank&#34;&gt;CloudKit Fundamentals&lt;/a&gt;&lt;br /&gt; &lt;a href=&#34;http://bit.ly/cloudkit-fundamentals&#34; target=&#34;_blank&#34;&gt;&lt;a href=&#34;https://www.andrewcbancroft.com/wp-content/uploads/2018/09/cloudkit-fundamentals-title-screen.png&#34;&gt;&lt;img src=&#34;https://www.andrewcbancroft.com/wp-content/uploads/2018/09/cloudkit-fundamentals-title-screen-1024x576.png&#34; alt=&#34;CloudKit Fundamentals&#34; width=&#34;1024&#34; height=&#34;576&#34; class=&#34;alignnone size-large wp-image-13708&#34; srcset=&#34;https://www.andrewcbancroft.com/wp-content/uploads/2018/09/cloudkit-fundamentals-title-screen-1024x576.png 1024w, https://www.andrewcbancroft.com/wp-content/uploads/2018/09/cloudkit-fundamentals-title-screen-300x169.png 300w, https://www.andrewcbancroft.com/wp-content/uploads/2018/09/cloudkit-fundamentals-title-screen-768x432.png 768w, https://www.andrewcbancroft.com/wp-content/uploads/2018/09/cloudkit-fundamentals-title-screen.png 1560w&#34; sizes=&#34;(max-width: 1024px) 100vw, 1024px&#34; /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; 
&lt;h1&gt;
  Course Outline
&lt;/h1&gt;
&lt;h2&gt;
  1 – Setting up CloudKit
&lt;/h2&gt;
&lt;p&gt;
  Module 1 is the introduction to the course with discussion of the motivating factors for using CloudKit, course prerequisites, storyline overview, and a demo of the end product of the course.
&lt;/p&gt;
&lt;p&gt;
  The demo app for this course is a fun one! I put you in the scenario where we team up to build a hazard reporting app for our company’s Safety Department.
&lt;/p&gt;
&lt;p&gt;
  The final product will come complete with the ability to save, query, update, and delete text, images, and location information into iCloud using the CloudKit framework.
&lt;/p&gt;
&lt;h2&gt;
  2 – Modeling and Saving Data
&lt;/h2&gt;
&lt;p&gt;
  Working with CloudKit begins with an understanding of the framework Types that are used to model and save data.
&lt;/p&gt;
&lt;p&gt;
  You&#39;ll learn about &lt;code&gt;CKRecords&lt;/code&gt; and &lt;code&gt;CKAssets&lt;/code&gt;, and save your first bits of data up to iCloud in this module.
&lt;/p&gt;
&lt;h2&gt;
  3 – Querying, Displaying, Updating, and Deleting Data
&lt;/h2&gt;
&lt;p&gt;
  Once data has been saved into an iCloud database, the next logical step is to query it and display it within the app.
&lt;/p&gt;
&lt;p&gt;
  I will teach about the &lt;code&gt;CKQuery&lt;/code&gt; class for querying the CloudKit database for records and/or assets, so that data can be retrieved and displayed in the UI.
&lt;/p&gt;
&lt;p&gt;
  And of course, once data is retrieved and displayed, it&#39;s fair game for updating and deleting.
&lt;/p&gt;
&lt;h2&gt;
  4 – Synchronizing Data Across Devices
&lt;/h2&gt;
&lt;p&gt;
  The whole point of CloudKit is to make sure that data is accessible from more than one device.
&lt;/p&gt;
&lt;p&gt;
  One of the primary features still glaringly missing from our Hazard Reporter app at this point in the course is the fact that it doesn’t automatically update when data changes in the CloudKit database.
&lt;/p&gt;
&lt;p&gt;
  In this module, I&#39;ll teach you about how CloudKit uses subscriptions and push notifications to alert other users’ devices to changes that have occurred in the CloudKit database, so that appropriate action can be taken in code to respond to those changes.
&lt;/p&gt;
&lt;p&gt;
  I&#39;ll also simulate hazard reports coming in from another user by adding data through the CloudKit Dashboard and watching the screen update with the new data in the iOS app.
&lt;/p&gt;
&lt;h2&gt;
  5 – Modeling Relationships Between Record Types
&lt;/h2&gt;
&lt;p&gt;
  Modeling relationships between Record Types is important for many scenarios. In this module I will teach how to work with &lt;code&gt;CKReferences&lt;/code&gt; in order to represent hierarchical relationships or to represent ownership between model objects.
&lt;/p&gt;
&lt;h2&gt;
  6 – Planning for Production
&lt;/h2&gt;
&lt;p&gt;
  Apple engineers repeatedly warn that CloudKit error handling isn’t the difference between a good app and a bad app… it’s the difference between a functional app and a non-functional app. To that end, I cover some of the most common CloudKit errors and how to handle them.
&lt;/p&gt;
&lt;p&gt;
  And alas, once a version of the app is ready enough to put into users’ hands, it’s crucial to test it and then put it into Production. I will discuss creating an Ad-Hoc deployment of the app so that it can be installed on other users’ devices via iTunes. I will also discuss deploying the CloudKit database schema to Production in preparation for deployment to the App Store.
&lt;/p&gt;
&lt;h1&gt;
  Course Resources
&lt;/h1&gt;
&lt;p&gt;
  Demos of technology in action are &lt;em&gt;super&lt;/em&gt; important to me. That being the case, I tried to pack as much demo content into the course as possible. You&#39;ll get to see the full array of dev-time experiences, not just the final &#34;it works perfectly&amp;#8221; outcomes.
&lt;/p&gt;
&lt;p&gt;
  The course also comes complete with working Xcode projects that gradually build you up to the final version of the app, one step at a time through each module.
&lt;/p&gt;
&lt;h1&gt;
  Feedback Welcome!
&lt;/h1&gt;
&lt;p&gt;
  I welcome feedback on this course, and on other iOS development courses you might be interested in seeing in the Pluralsight library. Happy learning!
&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>The Case for CloudKit</title>
      <link>https://www.andrewcbancroft.com/2018/08/06/case-for-cloudkit/</link>
      <pubDate>Mon, 06 Aug 2018 11:58:32 +0000</pubDate>
      
      <guid>https://www.andrewcbancroft.com/2018/08/06/case-for-cloudkit/</guid>
      <description>&lt;p&gt;When it comes to remote backend services for mobile apps, you’ve got options. What&amp;rsquo;s the case for CloudKit? Where does Apple&amp;rsquo;s remote data storage and sharing solution fit into the Apple Developer&amp;rsquo;s toolbox?&lt;/p&gt;
&lt;p&gt;I recently put out a survey on Twitter, just to get a feel for what folks are using.&lt;/p&gt;
&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;&lt;a href=&#34;https://twitter.com/hashtag/iosdev?src=hash&amp;amp;ref_src=twsrc%5Etfw&#34;&gt;#iosdev&lt;/a&gt; folks:  When your app needs a backend (ie, a remote server / remote database), what do you use?&lt;br&gt;&lt;br&gt;I’m also interested in the “why” - reply with a tweet if you care to share! Thanks! 🙌🏻&lt;/p&gt;&amp;mdash; Andrew Bancroft (@andrewcbancroft) &lt;a href=&#34;https://twitter.com/andrewcbancroft/status/1020265988561022976?ref_src=twsrc%5Etfw&#34;&gt;July 20, 2018&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;


&lt;p&gt;The clear winer was Firebase, followed by folks implementing their own backend server architecture. Dead last? A tie between Realm and CloudKit.&lt;/p&gt;
&lt;p&gt;”Hmm&amp;hellip;”, I thought, “What’s up? Why no love for CloudKit?&amp;quot;&lt;/p&gt;
&lt;p&gt;Of the options on my own survey, I’ve had experience building apps using three of the four: CloudKit, Firebase, and “rolling my own backend” with an app built for my employer.&lt;/p&gt;
&lt;p&gt;So I asked myself, “When would &lt;em&gt;you&lt;/em&gt; use CloudKit, Andrew?”&lt;/p&gt;
&lt;p&gt;Here’s how I tend break it down. The more of these that apply to you and your app development experience, the stronger the case for using CloudKit (in my opinion):&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;apple-platforms-only&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;apple-platforms-only-cloudkit&#34;&gt;Apple Platforms Only? CloudKit.&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re developing &lt;em&gt;solely&lt;/em&gt; for Apple&amp;rsquo;s platforms, CloudKit is the natural choice.&lt;/p&gt;
&lt;p&gt;One of the other CloudKit alternatives mentioned in the survey might have the upper hand if you&amp;rsquo;re developing for Android as well, but if you&amp;rsquo;re sticking to the Apple ecosystem, it makes sense to use their remote data storage and sharing service (ie, CloudKit).&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;cloudkit-js&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;expand-beyond-apple-platforms-with-cloudkit-js&#34;&gt;Expand Beyond Apple Platforms with CloudKit JS&lt;/h2&gt;
&lt;p&gt;Even if you&amp;rsquo;re &lt;em&gt;not&lt;/em&gt; developing solely for Apple&amp;rsquo;s platforms, CloudKit might still be a viable choice for you!&lt;/p&gt;
&lt;p&gt;Apple designed &lt;a href=&#34;https://developer.apple.com/documentation/cloudkitjs&#34;&gt;CloudKit JS&lt;/a&gt; to create companion web apps to your iOS and macOS apps. You must have an existing CloudKit app and enable web services to use CloudKit JS, but once you&amp;rsquo;ve got an Apple app configured, you can leverage CloudKit in the web version of your app if you have one.&lt;/p&gt;
&lt;p&gt;As I engaged with folks on Twitter about this, I learned that some were even leveraging CloudKit in an Android app using CloudKit JS as a bridge into the Apple ecosystem.&lt;/p&gt;
&lt;p&gt;This opens up the audience for your app tremendously!&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;authentication&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;built-in-authentication-cloudkit&#34;&gt;Built-in Authentication: CloudKit.&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re tired of creating sign up and login screens, look no further than CloudKit.&lt;/p&gt;
&lt;p&gt;This is especially true if you&amp;rsquo;re only worrying with developing for Apple&amp;rsquo;s Platforms.&lt;/p&gt;
&lt;p&gt;Users signed in with an Apple ID are automatically authenticated when your app uses CloudKit.&lt;/p&gt;
&lt;p&gt;Kiss the sign up/login screens goodbye!&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;free-longer&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;cloudkit-is-free-for-longer&#34;&gt;CloudKit is Free for Longer&lt;/h2&gt;
&lt;p&gt;All of the backend as a service providers offer a free tier or a free trial, and while I don&amp;rsquo;t have personal experience with these services&amp;rsquo; payment threshholds, it&amp;rsquo;s my observation that CloudKit&amp;rsquo;s free tier might &amp;ldquo;last longer&amp;rdquo;. What do I mean by that?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Data of any kind stored in a user&amp;rsquo;s &lt;em&gt;private&lt;/em&gt; database doesn&amp;rsquo;t count against your app&amp;rsquo;s storage alotment… it counts against the &lt;em&gt;user&amp;rsquo;s&lt;/em&gt; iCloud storage plan. This extends the mileage of your &lt;em&gt;app&amp;rsquo;s&lt;/em&gt; storage alotment.&lt;/li&gt;
&lt;li&gt;CloudKit distinguishes between storage for &lt;em&gt;non-binary data&lt;/em&gt; and storage for &lt;em&gt;media&lt;/em&gt; (binary data like images, videos, audio, etc). You &lt;a href=&#34;https://developer.apple.com/icloud/cloudkit/&#34;&gt;start off with&lt;/a&gt; 100 MB of non-binary data storage, but &lt;strong&gt;10 GB&lt;/strong&gt; of image/video/audio/etc. storage. In contrast…
* Firebase &lt;a href=&#34;https://firebase.google.com/pricing/&#34;&gt;starts to charge you&lt;/a&gt; $25/mo after &lt;strong&gt;5 GB&lt;/strong&gt; of media storage
* Realm Platform &lt;a href=&#34;https://realm.io/pricing&#34;&gt;offers a 30 day free trial&lt;/a&gt;, but is $30/month after that, and acts primarily as a remote data store for non-binary data.&lt;/li&gt;
&lt;li&gt;As the number of users for your app grows, your storage and transfer limits scale with your app&amp;rsquo;s user base. I don&amp;rsquo;t have personal experience here, but I wonder… by the time your app grows to 100,000 users (the tipping point for Apple to scale your app&amp;rsquo;s alotments up), how probable is it that you&amp;rsquo;d already be paying to use Firebase?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;own-backend&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;rolling-your-own-backend-consider-cloudkit&#34;&gt;Rolling Your Own Backend? Consider CloudKit.&lt;/h2&gt;
&lt;p&gt;Folks already invested in Realm or Firebase are already leveraging a backend as a service platform. It&amp;rsquo;s those that are maintaining backend server infrastructure &lt;em&gt;themselves&lt;/em&gt; that I might suggest consider CloudKit.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been in the shoes of those who have to roll their own backend server and maintain those VMs, databases, web servers… the works.&lt;/p&gt;
&lt;p&gt;Many times this is because there&amp;rsquo;s a need to connect a mobile app to an organization&amp;rsquo;s on-premise/public cloud ecosystem, and for that, I can totally empathize.&lt;/p&gt;
&lt;p&gt;CloudKit offers a reliable alternative that organizations developing for Apple&amp;rsquo;s platforms should consider. It&amp;rsquo;s a huge weight off the shoulders to abstract the backend and let Apple maintain those servers and storage components. Data stored in the &lt;strong&gt;public&lt;/strong&gt; cloud database &lt;em&gt;is&lt;/em&gt; accessible programmatically, so your organization &lt;em&gt;can&lt;/em&gt; get at data stored there for incorporation into its internal ecosystem.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;first-party-only&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;company-requirement-1st-party-frameworks-and-services-only-cloudkit&#34;&gt;Company Requirement: 1st Party Frameworks and Services Only? CloudKit.&lt;/h2&gt;
&lt;p&gt;This requirement is most likely to be seen within companies and organizations that have an aversion to bringing in a lot of 3rd party dependencies.&lt;/p&gt;
&lt;p&gt;Those of us who have an employer or who work for clients that have a say in what our app development toolkit can consist of may need to consider options within the Apple ecosystem.&lt;/p&gt;
&lt;p&gt;CloudKit is a dependable choice for risk-averse companies.&lt;/p&gt;
&lt;p&gt;Speaking of risk aversion…&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;third-party-risk-aversion&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;personal-3rd-party-risk-aversion8230-cloudkit&#34;&gt;Personal 3rd Party Risk Aversion… CloudKit.&lt;/h2&gt;
&lt;p&gt;This one hits close to home for me, because I&amp;rsquo;ve experienced the pain of having a 3rd party service I depended on for &lt;em&gt;multiple apps&lt;/em&gt; be discontinued. *Cough* &lt;strong&gt;&lt;a href=&#34;https://blog.parseplatform.org/announcements/moving-on/&#34;&gt;Parse&lt;/a&gt;&lt;/strong&gt; *Cough*&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m usually okay with 3rd party libraries, but 3rd party &lt;em&gt;services&lt;/em&gt; are another story altogether for me.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re using a library that ends up fading away, it may take a little reworking to get your code to compile with an alternative.&lt;/p&gt;
&lt;p&gt;But when you&amp;rsquo;ve got data that your app depends on living on a remote server hosted by a 3rd party, and that service goes away… Oy! Talk about the pain, frustration, and hassle of having to do a &lt;em&gt;migration&lt;/em&gt; &lt;strong&gt;on top of&lt;/strong&gt; rewriting code.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;only-need-data-store&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;only-need-a-remote-data-store-keep-it-simple-cloudkit&#34;&gt;Only Need a Remote Data Store? Keep it Simple. CloudKit.&lt;/h2&gt;
&lt;p&gt;There is a &lt;em&gt;ton&lt;/em&gt; that can be done on-device these days. If all you&amp;rsquo;re in the market for is a remote data store to facilitate data sharing across devices or with other users and have no need of remote cloud functions or analytics or remote machine learning services, etc., you might opt to keep it simple and leverage CloudKit.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;apple-uses&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;depend-on-what-apple-depends-on-cloudkit&#34;&gt;Depend On What Apple Depends On: CloudKit.&lt;/h2&gt;
&lt;p&gt;What does Apple depend on for their own apps&amp;rsquo; remote data storage and sharing needs?&lt;/p&gt;
&lt;p&gt;Answer: CloudKit.&lt;/p&gt;
&lt;p&gt;Clearly, Apple is in a unique situation: Apple neither needs nor cares to develop any of its apps for Android. Naturally, they&amp;rsquo;d depend on the very framework they created. Otherwise, we could argue, &amp;ldquo;What a bunch of hypocrites!&amp;rdquo;, right?&lt;/p&gt;
&lt;p&gt;CloudKit serves the needs of apps like Photos, iCloud Drive, Notes, News, and more.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s almost as if Apple developed CloudKit for Apple, and decided, &amp;ldquo;Hey, let&amp;rsquo;s open this up to our developers and let them tap in to what works awesome for us!&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I like that. I like the security of knowing that Apple depends on the framework they&amp;rsquo;re delivering to us.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;tradeoffs&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;tradeoffs&#34;&gt;Tradeoffs&lt;/h2&gt;
&lt;p&gt;In fairness, I would point out a few trade-offs if you were to go with CloudKit.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;no-android-support&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;no-native-android-support&#34;&gt;No Native Android support&lt;/h3&gt;
&lt;p&gt;This tradeoff is qualified with the words &amp;ldquo;no &lt;em&gt;native&lt;/em&gt; Android support&amp;rdquo; for a reason. CloudKit JS may actually open the door for folks developing cross platform apps, though it may take some hacking.&lt;/p&gt;
&lt;p&gt;Expect some challenges on the Android side of things, but don&amp;rsquo;t completely count CloudKit out.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;data-storage-only&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;data-storage-and-sharing-_only_-with-cloudkit&#34;&gt;Data storage and sharing &lt;em&gt;only&lt;/em&gt; with CloudKit&lt;/h3&gt;
&lt;p&gt;With CloudKit, you get a fully-functional remote data storage and sharing service. If you&amp;rsquo;re wanting to leverage some advanced functionality like &amp;ldquo;cloud functions&amp;rdquo;, analytics for your app, non-Apple ID authentication, remote machine learning services, and the like, you won&amp;rsquo;t find those features in CloudKit.&lt;/p&gt;
&lt;p&gt;This doesn&amp;rsquo;t mean that Apple leaves you nanging when it comes to authentication, analytics, machine learning, etc.&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t forget that you&amp;rsquo;ll have built-in Apple ID authentication as I mentioned above, and analytics are provided through iTunes Connect.&lt;/p&gt;
&lt;p&gt;On-device machine learning with CoreML might also alleviate the need to seek remote ML services.&lt;/p&gt;
&lt;p&gt;If, after considering Apple&amp;rsquo;s component solutions, you&amp;rsquo;re looking for alternatives, Firebase offers all of the above as sort of an all-in-one package.&lt;/p&gt;
&lt;p&gt;As I mentioned above though… if all you really &lt;em&gt;need&lt;/em&gt; is a remote data store for cross-device data syncing, don&amp;rsquo;t over-complicate things. CloudKit can still serve you well.&lt;/p&gt;
&lt;p&gt;Another alternative is to use a public cloud provider like Azure or AWS for &amp;ldquo;cloud functions&amp;rdquo; or remote machine learning. If you prefer to component-ize these kinds of services, this is a viable alternative to Firebase, or Apple&amp;rsquo;s own solutions to these kinds of problems.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;feedback&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;what-do-you-use-why&#34;&gt;What do you use? Why?&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m a pragmatist. I don&amp;rsquo;t always use CloudKit. But I do like CloudKit when I can use it.&lt;/p&gt;
&lt;p&gt;What do &lt;em&gt;you&lt;/em&gt; use? Why? What&amp;rsquo;s your experience with backend as a service providers? What else would you consider in the case for CloudKit? What other tradeoffs do you recognize?&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;jump-target&#34; name=&#34;share&#34;&gt;&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>