Under The Bridge Under The Bridge

Tag: Cloud
Fabric, R.I.P.

Catch the news yesterday? That was a mild surprise:

Fabric is Joining Google

Welcoming Fabric to Google

Although only mild, we grant you, because, well…

Indeed. Clearly this is great if you’ve already bought into the Firebase platform, but if you haven’t there’s a bit of thinking to do now, especially for those of us in businesses that Google actively competes with so have a smidgen of trepidation about handing over our collective user profiles and activity. Paranoid, yes yes, but hey paranoids have enemies too.

Not much out there in the way of comprehensive alternatives for your development deployments left though: for cross-platform development this Visual Studio Mobile Center thing that HockeyApp is growing up into might be interesting, but that looks like pretty much it, really.

‘Course, you could always just go all in on Testflight and let other platforms fend for themselves; it’s the easiest by far, that it’s iOS 8 or later should be no longer a problem in 2017 — if that still is a problem for you, our most sincere condolences — plus we gather that frontloading the binary approval process into the beta distribution is supposed to make the final review go noticeably quicker. That would be a quite acceptable tradeoff indeed for having to get your betas approved; does anyone have any firm statements and/or evidence that using TestFlight does actually expedite final review, or is this urban legend?

And as always, if we’ve missed the beta distribution method of your choice here, please educate us!

Notification Tokenism

So, did you catch WWDC 724 yet? It’s less than 15 minutes, check it out:

What’s New in the Apple Push Notification Service (transcript)

Starting with a review of the HTTP/2 based provider API, you will learn about an important new feature: Token Based Authentication. Learn to connect to APNs using authentication tokens for sending pushes via the HTTP/2 API, relieving you of the overhead associated with maintaining valid certificates.

Ah, yes. Longtime readers will remember various instances of untrammelled joy (where by “joy” we mean “near-homicidal frenzy”) APNs has provided over the years, so this is a very interesting indeed development. Full details were published September 20 at

Local and Remote Notification Programming Guide / Apple Push Notification Service

and announced September 22. So let’s check this out, shall we? Especially as we got the annually dreaded “This certificate will no longer be valid in 30 days.” email day before yesterday, which makes the timing entirely apropos!

Step 1: Oh look, now under certs in the Dev Portal we have this new “APNs Auth Key” option! So add one, and…

Step 2: Read the instructions:

Download, Install and Backup

Download your Authentication Key to your Mac, then double click the .key file to install in Keychain Access. Make sure to save a back up of your key in a secure place. It will not be presented again and cannot be retrieved at a later time.

Step 3: Be confused as the download gives you a .p8 file, not a .key file, and it’s not evident how you get that into the Keychain.

Step 4: Check out the discussion on the dev boards:

It’s a PEM-encoded, unencrypted PKCS#8 file. You can inspect it with openssl pkcs8 -nocrypt -in <your_file.p8>, but you’ll need a newer version of OpenSSL than the one that ships with El Capitan (I’m not sure which version comes with Sierra). I’m not sure how to import it into the Keychain, but I also haven’t run into a situation where having it in the Keychain would be helpful (other than just for storage).

Step 5: OK then, let’s find some service that can use this shiny new .p8 file then…

Step 6: ¯\_(ツ)_/¯ Not much out there yet!

Alright, so we’ll keep working with a cert-based process for the moment then, check for UPDATES! below once we find some. In the meantime, development tools that can work with the shiny newness? Hmmmm … looks like you’re pretty much on your own there too as we write this. Right then, if you know of any token-supporting services or tools, hit the comments section!

If you’re proactive enough to want to help move the development tools scene along, our goto for APNs tinkering for a while now has been Knuff: “The debug application for Apple Push Notification Service (APNs).” along with Knuff-Framework “just add it to your application and the phone will be visible under “Devices”” and Knuff – The APNs Debug Tool on the App Store! Pretty complete ecosystem there and we strongly encourage helping out with it if you’re interested in this space.

If you’re new to this APNs thing, or If you’d simply like a straightforward HTTP page to use for testing, check out this new site PushTry.com to, eponymously enough, try pushing:

pushtry.jpeg

Nicely done tutorials for both iOS and Android, clean and functional; definitely recommend you give that a pushtry. And they’re working on token support too!

Should you be looking to get this on your server side ASAP, a quick look around for projects at least using HTTP/2 APNs, that being kinda the floor for ‘actively maintained’ currently, in a variety of environments turns up these:

VaporAPNS “is a simple, yet elegant, Swift library that allows you to send Apple Push Notifications using HTTP/2 protocol in Linux & macOS. It has support for the brand-new Token Based Authentication but if you need it, the traditional certificate authentication method is ready for you to use as well. Choose whatever you like!”

swift-apns: “Swift Framework for sending Apple Push Notification over HTTP/2 API”

node-apn: “A Node.js module for interfacing with the Apple Push Notification service.”

ApnsPHP: “Apple Push Notification & Feedback Provider”

APNS/2 “is a go package designed for simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the new HTTP/2 Push provider API.”

And again, if you have good … or bad … experiences with any particular piece of APNs server kit, let us know!

UPDATES:

docker-swift-apns: “A collection of Docker images to build APNS providers in Swift”

Push Notifications and Local Notifications – Tutorial

Push Notifications Tutorial: Getting Started

NWPusher: “OS X and iOS application and framework to play with the Apple Push Notification service (APNs)”

iOS remote push notifications in a nutshell

Core Data iSunny iDays

Why “iSunny iDays”? Why, because iCloud is going iAway! That’s no surprise for those of you paying attention since 2014 at least, but now it’s sorta-kinda official. As usual, Michael Tsai has a good roundup:

The Deprecation of iCloud Core Data

… When installing the Xcode 8 beta, I noticed that all of the symbols related to iCloud Core Data were marked as deprecated in macOS 10.12 and iOS 10, with the comment “Please see the release notes and Core Data documentation.” Strangely, the Core Data release notes and What’s New in macOS 10.12 documents make no mention of this. What’s New in iOS 10 simply says that “Several NSPersistentStoreCoordinator symbols related to ubiquitous content” have been deprecated.

I asked on Twitter what was up, and no one seemed to know. No one had anything nice to say about iCloud Core Data, either, though no doubt many developers still rely on it. I hoped that all would be explained in today’s WWDC Session 242: What’s New in Core Data. Alas, reports are that absolutely nothing was said about iCloud in the session…

No need to panic immediately, they’re not pulling a Parse on us or anything like that … yet … but you certainly would be well served to adopt an alternate solution if Core Data iCloud sync appears anywhere in your technology roadmap. Apparently the mothership has something in the works, but if you have an immediate development need for Core Data cloud sync, there’s one clear choice:

It seems clear that the way forward is Ensembles, unless you want to write your own sync engine or wait for Apple to announce one. I hope that the deprecation will spur more of the community to coalesce around Ensembles.

Indeed. We’ve been vaguely aware of it since the 2013 announcement, but we’d managed to miss until now that there’s a commercial with source access Ensembles 2 that includes CloudKit and other backends, whilst the original remains open source on GitHub. And in the likely event that you agree that seems a clear way forward, this is a good time to jump on board:

The Core Data Sync Deprecation Sale

If you move to Ensembles now, you not only get the usual support, documentation, and source code, you also get it all at half the standard price. The sale will continue until macOS Sierra is released later this year.

Whilst that sync thing is still up in the air, Core Data itself moved forward nicely this year, most notably in that standing up your stack is now much more straightforward:

Concurrent Core Data, Now Easier Than Ever

Core Data has a popular opinion of being hard to use, especially in concurrent environments. Why is that the case? First, it truly is complex because it solves a hard problem. Second, until WWDC16 Apple haven’t really said how to best set up the Core Data stack. There were many options, each with its own issues, that we had to choose from.

That’s why I’m super happy that things get clearer in iOS 10 with the introduction of NSPersistentContainer…

We’ve been pretty happy with JSQCoreDataKit for our Swift projects, but soon as your deployment targets allow, there’s all sorts of win with the new stuff here!

And as a final note, if you’re all excited about the new playground stuff — and who isn’t? — check out the explorations here:

Using a Core Data Model in Swift Playgrounds

Is this a great time to be alive, or what?

UPDATES:

Building The Perfect Core Data Stack

Cleaning up Core Data Fetch Requests

Seam: “Seamless CloudKit Sync with Core Data”

Core Data on iOS 10, a brief overview with an Example

A Swift Implementation of the Core Data Stack Using NSPersistentContainer

Moving Core Data Files

Kuery: “A type-safe Core Data query API using Swift 4’s Smart KeyPaths”

The Laws of Core Data and rebuttal

Working with Codable and Core Data

Preferred schema settings for Core Data debugging

Core Data Debugging in Xcode using launch arguments

Painless Core Data in Swift

How a Model Controller works with Core Data in Swift

A Wild URL Appeared!

This is an interesting article about using Swift pattern matching for routing deeplink URLs:

URL Pattern Matching

The majority of URL routing libraries use a pattern syntax that can match each element of a URL’s path in one of three ways:

  • Equality: Path element must match the pattern expression
  • Value-binding: Path element can be anything at all, and will be made available in a parameters dictionary
  • Wildcard: Path element can be anything at all, and will be discarded

… There are a few reasons I don’t much like this approach:

  • The pattern matching is abstracted away using special syntax.
  • The parameter name userId is repeated and stringly typed, so it’s susceptible to typos.
  • parameters[“userId”] should never be nil, but the compiler doesn’t know that, so we must force unwrap or add a guard statement.

As it happens, Swift’s built-in pattern matching can be used for each of the three pattern types…

Proceeds to walk through the design process of a few abortive approaches, and ends up with the URLPatterns library here:

I prefer this approach to the approach taken by most URL routing libraries for a few reasons:

  • It’s simple to bypass URLs and open a deeplink directly, e.g. by calling DeepLinker.open(.Home).
  • The pattern-matching code is no longer in a third-party library, which makes it easier to debug.
  • The pattern-matching code leverages Swift’s built-in pattern-matching, which means it can be customized and extended.
  • The pattern-matching and routing processes are separated into two steps. This provides an override point if needed…

Neat! For even more niftiness, check out the Generator approach in URLs and Pattern Matching mentioned in the comments.

And while we’re discussing routing, if you want something more conventional, this looks like a good choice:

JLRoutes: “URL routing library for iOS with a simple block-based API.”

  • Simple API with minimal impact to existing codebases
  • Parse any number of parameters interleaved throughout the URL
  • Wildcard parameter support
  • Seamlessly parses out query string and fragment parameters and passes them along as part of the parameters dictionary
  • Route prioritization
  • Scheme namespaces to easily segment routes and block handlers for multiple schemes
  • Return NO from a handler block for JLRoutes to look for the next matching route
  • Optional verbose logging
  • Pretty-print the whole routing table
  • No dependencies other than Foundation

Looks like a sweet dropin to handle just about everything you’d want, that!

UPDATES:

Simple Deep Linking in Swift

iOS: How to open Deep Links, Notifications and Shortcuts

Fire Up The Base

In case you’ve been floundering about what to do service side since Parse dropped the BaaS, here’s something you’ll want to take a look at — Google has seriously levelled up Firebase with unification and new services:

FireBaseServices.png

Firebase is expanding to become a unified app platform for Android, iOS and mobile web development. We’re adding new tools to help you develop faster, improve app quality, acquire and engage users, and monetize apps. On top of this, we’re launching a brand new analytics product that ties everything together, all while staying true to the guiding principles we’ve had from the beginning:

  • Developer experience matters. Ease-of-use, good documentation, and intuitive APIs make developers happy.
  • Work across platforms. We’ll support you whether you’re building for iOS, Web, or Android.
  • Integrate where possible. Firebase has one SDK, one console, and one place to go for documentation and support…

That’s a lot of features there, with free to minimal pricing until you’re scaled up looks like.

Particularly interesting is that they’ve put at the centre there this new analytics service,

At the heart of Firebase is Firebase Analytics, a free and unlimited analytics solution. Analytics integrates across Firebase features and provides you with unlimited reporting for up to 500 distinct events that you can define using the Firebase SDK. Firebase Analytics reports help you understand clearly how your users behave, which enables you to make informed decisions regarding app marketing and performance optimizations…

Custom audiences can be defined in the Firebase console based on device data, custom events, or user properties. These audiences can be used with other Firebase features when targeting new features or notifications.…

As it happens, we’d just been planning to get around to picking an analytics platform for the next project, as it’s been a hella long time since we last surveyed that space, or even updated with notes on the general consensus:

If marketers are going to be using analytics tools, Mixpanel or Localytics. If developers want data to play with, Flurry.

Since then, Flurry was absorbed into Yahoo Mobile Developer Suite, Localytics and Mixpanel appear to be doing fine although now we have actually accurate marketing analytics from Apple,

App Analytics is Apple’s very own analytics platform. It lives right inside of iTunes Connect. Announced at the WWDC in summer 2014, it launched finally in spring 2015 and just recently added support for tvOS apps. One might say just “another” analytics platform like free solutions from Flurry/Yahoo Mobile, Google or Facebook, but App Analytics finally provides reliable data nobody else can (Spoiler: App Store impressions, referring websites, attribution)

You should read all the rest if you aren’t familiar with it, but since it requires no technical implementation there’s no support decision to be made there so we can move on. Let’s check a couple curated collections:

Apptamin’s App Analytics Tools Round-up

iOS Dev Tools’ Analytics section

awesome-ios’ Analytics section

Well, clearly if you have trouble reaching a decision, ARAnalytics is for you:

ARAnalytics is an analytics abstraction library offering a sane API for tracking events and user data. It currently supports on iOS: Mixpanel, Localytics, Flurry, GoogleAnalytics, KISSmetrics, Crittercism, Crashlytics, Fabric, Bugsnag, Countly, Helpshift, Tapstream, NewRelic, Amplitude, HockeyApp, HockeyAppLib, ParseAnalytics, HeapAnalytics, Chartbeat, UMengAnalytics, Librato, Segmentio, Swrve, YandexMobileMetrica, Adjust, AppsFlyer, Branch, Snowplow, Sentry, Intercom, Keen, Adobe and MobileAppTracker/Tune…

And if you’d prefer to just follow the herd, looks like they’re heading for Twitter these days:

Answers Named #1 in Mobile Analytics for iOS

Back in May, Answers was ranked as #2 on iOS and #3 on Android in the mobile analytics space by SourceDNA, the world’s largest database of mobile app intelligence. Since then, we’ve been building out new features like Answers Events, which helps you track specific actions and events in real time, to better understand how users are behaving within your app.

Today, we’re thrilled to tell you that Answers has now been named the #1 most implemented mobile analytics SDK on iOS — just five months after it was named #2!

So no lack of innovation in that space, definitely. If you decide to jump on the new Firebase bandwagon, be sure to let us know how it goes for you!

UPDATES:

Getting Started with Mobile Analytics

28 Metrics That Matter for Your App

Firebase 101, a simple todo list app

Creating a Backend for Your iOS App Using Firebase

Google’s Firebase developer platform gets better analytics, crash reporting and more

Introducing Firebase with Swift 3: Login and Sign Up; Using Firebase to Integrate Facebook Login in iOS Apps

Keep an eye on the competitive developments over at Microsoft: The Next Generation of HockeyApp

Firebase Tutorial: iOS A/B Testing

Fabric lands top spots for app analytics, stability, and monetization

Well, that makes the decision process simpler: Fabric, R.I.P.

Marco Arment:

iOS devs: Any decent self-hostable crash reporters, analytics packages?

I think it’s wise to consider bringing this in-house these days.

Quick-Chat: “Real time chat app written in Swift 3 using Firebase”

Back-End as a Service for Mobile Apps

Implementing Push Notifications on iOS with Firebase

Using Firebase Cloud Messaging for Remote Notifications in iOS

Advanced Firebase For The Win

Firebase Costs Increased by 7,000%!

Get Started With Firebase for iOS Apps

Scratching the Firebase services with your iOS app

Why Firebase sucks

Swift Mushroom Clouds

Our friends at DZone have a new guide out worth reading for a grand overview of the cloudscape these days:

DZone’s 2016 Guide to Building and Deploying Applications on the Cloud

The question isn’t whether or not to use the cloud; it’s when and how. This guide contains everything from building 12-factor apps to hiring full-stack engineers. Navigate through a 90+ cloud solutions directory and start coding right away. Dive into the research findings from 700+ developers on *aaS adoption, cloud security models, container use (including Docker), and more.

Historically we’ve tended to have a fairly detached regard for the state of the cloud, it being so far over our heads and all, but we’ve been contemplating the idea of moving into full stack engineering due to the way Swift clouds are mushrooming all over the place. No, seriously, mushrooming; just check out the current list from awesome-ios:

  • Perfect – Server-side Swift. The Perfect library, application server, connectors and example apps.
  • Swifter – Tiny http server engine written in Swift programming language.
  • CocoaHTTPServer – A small, lightweight, embeddable HTTP server for Mac OS X or iOS applications.
  • Curassow – Swift HTTP server using the pre-fork worker model. [And check out the rest at github/kylef!]
  • Zewo – Venice based HTTP server for Swift 2.2 on Linux
  • Vapor – Elegant web framework for Swift that works on iOS, OS X, and Ubuntu.
  • swiftra – Sinatra-like DSL for developing web apps in Swift
  • blackfish – A fast HTTP web server based on Node.js and Express written in Swift
  • swift-http – HTTP Implementation for Swift on Linux and Mac OS X
  • Trevi – A powerful Swift Web Application Server Framework Project
  • Express – Swift Express is a simple, yet unopinionated web application server written in Swift
  • Aeon – Aeon is a GCD based HTTP server for Swift 2.
  • Taylor – A lightweight library for writing HTTP web servers with Swift
  • Frank – Frank is a DSL for quickly writing web applications in Swift
  • Kitura – Web framework and HTTP server for Swift by IBM
  • Swifton – A Ruby on Rails inspired Web Framework for Swift that runs on Linux and OS X
  • Dynamo – High Performance (nearly)100% Swift Web server supporting dynamic content.

Personally, we’re inclined to agree with people who like the look of Swift Express

Being perfectionists, we took the best from what we think is the best: power of Play Framework and simplicity of Express.js

Express is an asynchronous, simple, powerful, yet unopinionated web application server written in Swift…

…but we may just be biased because the authors are from Lviv. We were there a couple years back, it’s pretty cool.

Here’s some helpful introductions to server-y Swiftness:

Hello Server Side Swift

Getting Started with OpenWhisk Server Side Swift

Swift + Kitura on DigitalOcean

swift-for-backend-SNAPSHOT-2016-03

And some help that’s not server specific, but likely to be of interest to living out on the bleeding edge here:

Cross-platform Swift “A talk about writing Swift targeting multiple platforms. Given at App Builders 🇨🇭 2016.”

Practical Cross-Platform Swift

Swift And C: Everything You Need to Know

swiftenv: “Swift Version Manager — allows you to easily install, and switch between multiple versions of Swift.”

Let us know about your experiences with any of these frameworks!

UPDATES:

Building Slack Bots In Swift

Why I’m Not Using Swift On The Server (Yet)

Server Side Swift vs. The Other Guys — 1: Input

Try out Swift packages in the IBM Swift Sandbox

Super Spectacular Server-Side Swift!

BluePic: “is a sample photo sharing application for iOS that shows you how to connect your mobile application with Kitura, Bluemix services, and OpenWhisk actions.”

Swift on the Server – Where Are We Today?

Cross-Platform Swift by Boris Bügling

Building Your First Web App in Swift Using Vapor

Swift on Linux

Build an end-to-end Swift app with Watson APIs

Tailored Swift – coming soon to a cloud near you

Serverless Swift: Running Swift Code on Amazon Lambda

Building a Production Server Swift App: Lessons Learned

SwiftyBeaver/SBWebsite: Logging in server-side Swift; Deployment of a Swift Vapor App to the AWS EC2 Cloud

My Thoughts on Server-side Swift: Routing

Kitura/iOS: Running a Web Server on your iPhone

Swift… Swift everywhere

Getting Started with Server Side Swift: 1.0; Getting Started with Server Side Swift: 1.2

Deploying Server Side Swift to Linode

SCADE: Cross-Platform mobile development with Swift ; Swift for cross platform client & server side development

Server-Side Swift Live Coding

Server-Side Swift: Comparing Vapor and Perfect

Current Features & Benefits of the Top Server-Side Swift Frameworks

Building a Swift Web API

Vapor 2: Less code, more power.

Errors On The Server

Swift Cloud Workshop – Swift Microservices: “How to deploy Swift micro-services using Docker and Kubernetes, with scaling, monitoring and fault tolerance using the Kitura server side Swift framework.”

Kitura Tutorial: Getting Started with Server-side Swift

Kitura Stencil Tutorial: How to make Websites with Swift

Server-Side Swift: Kitura vs Vapor + Vapor vs. Kitura: Choosing a Server-Side Swift Framework

Vapor 3.0.0 released

Swift for Android: Our Experience and Tools

Type-safe APIs with Swift gRPC

Supporting Push Notifications with Vapor 3

Watermarking photos with ImageMagick, Vapor 3 and Swift on macOS and Linux

Building a Scalable URL Shortener Service using Swift with Vapor3

An iOS Developers journey into Server-Side Swift using Vapor

Blogging In Swift and Part 2; swift-blog example

Smoke Framework: “a light-weight server-side service framework written in Swift and using SwiftNIO for its networking layer by default” + related projects

Server-side Swift: Making Canopy (1/6) + (2/6) + (3/6) + (4/6) + (5/6)

Deploying to Vapor Cloud 2 Tutorial

How to Think in Server-side Swift

Sharing Swift Code Between iOS and Server Applications

Kubernetes Tutorial for Swift on the Server

Server-side Swift with Vapor 3 – backend set up

Tutorial: Building a Facebook bot with Vapor 3 and Swift

Vapor – Deep Dive Guide into Setup and Deployment for Heroku and Ubuntu

Parse Drops the BaaS

So the veritably seismic news of the week, should you rely on Parse for mBaaS services, is their pulling a StackMob:

We have a difficult announcement to make. Beginning today we’re winding down the Parse service, and Parse will be fully retired after a year-long period ending on January 28, 2017. We’re proud that we’ve been able to help so many of you build great mobile apps, but we need to focus our resources elsewhere…

If you think hosted services are a business opportunity, here’s source for a head start :

Parse Server was built in Node.js and works with the Express web application framework. It can be added to existing web applications, or run by itself. Check out the server and migration guides here, the open-source repository here, and the example project here. We encourage you to provide bug reports and feedback via the GitHub issues on the Parse Server repository. There’s even a developer wiki, which can be found here.

Nearly everything you’ll need for your app is supported in Parse Server, with the main exceptions of Push delivery, Analytics, and Config…

So that’s something. For a great roundup of rants and insights on just how little that something is, head over to Michael Tsai’s and check out Sunsetting Parse. All worth reading to share the pain, but here’s some particularly good giggles:

Guy English:

If it had been me shutting down Parse I would have changed the home page to not point out how many “Trust Us”.

Jeff Lawson:

“But seriously developers, trust us next time your needs temporarily overlap our strategic interests. And here’s a t-shirt.”

Joel Bernstein:

The subtext to the Parse shutdown is “never trust a Facebook platform ever again, for any reason”

Feel the burn!

Moving on, you can always take Marco Arment’s advice:

For whatever it’s worth, running your own Linux servers today with boring old databases and stable languages is neither difficult nor expensive. This isn’t to say “I told you so” — rather, if you haven’t tried before, “You can do this.

But if you’d really, seriously, rather not have to add maintaining your own backend to your load, there’s a crowdsourced list here that looks good:

ParseAlternatives: A collaborative list of Parse alternative backend service providers.

Current categories are:

Personally, we’d like to try out CloudKit one of these days…

UPDATES:

iOS Dev Tools: Backend Services

How To Migrate Your App And Protect It From Shutdowns Like Parse’s

Top 5 Parse Alternatives

Migrating My Data From Parse

AppCoda.com Parse series:

Deploying Parse Dashboard

Parse Server: A Viable Open Source Platform?

Parse Server – 100 days later

Migrating to Parse Server: Adventures With Heroku and Why We Broke Up

Parse Server Tutorial with iOS

CloudKit On The Horizon

So we’ve previously observed with some amusement the insurmountable opportunities associated with Core Data iCloud synchronization, and noted some valiant efforts to redress the situation that unfortunately seem to have not set the world on fire; and, well, it seems that Apple’s pretty much given up on that. You may have noticed that the “What’s New in Core Data” WWDC 2014 was a little … thin, yes? Like the iCloud news segment was one slide,

  • Transitioning to new infrastructure
  • Reliability improvements
  • Performance enhancements
  • Transparent to developers

Hmmm. When the year’s news can be comprehensively enumerated as “sucks less”, that’s not the best investment signal, is it now.

But wait! We have a new hotness in the data sync world, or at least the Apple fiefdoms therein, as posted at iCloud For Developers:

CloudKit

Leverage the full power of iCloud and build apps with the new CloudKit framework. Now you can easily and securely store and efficiently retrieve your app data like structured data in a database or assets right from iCloud. CloudKit also enables your users to anonymously sign in to your apps with their iCloud Apple IDs without sharing their personal information.

With CloudKit, you can focus on your client-side app development and let iCloud eliminate the need to write server-side application logic. CloudKit provides you with Authentication, private and public database, structured and asset storage services — all for free with very high limits.

Introducing CloudKit

Advanced CloudKit

What’s New in Core Data

iCloud Design Guide (Pre-release)

CloudKit Framework Reference (Pre-release)

And although they list ‘What’s New in Core Data’ there, we’d like to bestow our 2014 WWDC Unintentional Deadpan Humour Award to Melissa Turner for her commentary on that session’s single CloudKit slide:

… I don’t know what either of those means. You should probably go watch the video of their session. Somebody gave me these slides. And asked me please to talk to you guys about it.

Why, she reminds us of our own style of following orders under protest! And just in case you missed that subtle hint, the only related session mentioned at the end was “Introducing CloudKit”. So, y’know, it’s not like the signposts here are anything other than completely obvious.

The general industry reaction is represented nicely here,

What does Apple’s CloudKit mean for mBaaS

Architecting an application around CloudKit locks your data into the Apple ecosystem. This means no access to this data for your Android application that half your users use. No access for your web application, no access for your web app, and no access to the data for your analytics engine to crunch the numbers.

Apple has yet to release any details of a REST API or export mechanism for this data. While the appeal when writing a simple application might be to use the out-of-the-box cloud APIs made available by Apple, in the longer term will prove very limiting. When extending this application to other platforms mobile or otherwise, there’s no way to utilise the same database elsewhere.

Apple of course has an agenda here – they’re trying to encourage developers, and thus in turn users, into their closed ecosystem – and a fantastic ecosystem it is. Unfortunately, that’s not the reality of the market. Users access applications across disparate platforms, made by disparate vendors. That should make CloudKit a non-runner for most applications.

Sounds about right. But for those with more modest initial goals, it’s pretty cool yes? Some commentaries worth reading:

Notes on CloudKit

But I still bet that lots of apps will benefit from this. Somewhere people are thinking about their existing apps and how they’d benefit — and people are planning new apps that they wouldn’t have otherwise been willing to try.

I think this is going to be a huge deal. I think it’s the first time Apple has really nailed a web service for developers. And I tip my hat to the team (or teams) behind all this. Good job, folks.

Did CloudKit Sherlock Ensembles?

First, let me say, I think CloudKit is awesome. It probably should have been iCloud 1.0 three years ago. Apple have done a great job, and I fully expect this to succeed. It’s particularly useful for apps that not only need cloud storage, but also have social aspects.

CloudKit is basically Apple’s take on schema-less cloud storage. Think Parse.com or Azure Mobile Services, and you’ve pretty well grasp CloudKit. You can store data records in the cloud — not just files — and don’t have to write any networking code. You can insert records, form relationships, and perform search queries, much like a cloud variant of Core Data (though not as powerful).

As good as it seems to be, there are limitations. CloudKit is not cross platform, so you can forget Android, and there is no web access to the data. But there should be plenty of smaller companies happy just to ‘win’ the Apple market, so I think it will get adopted.

Certainly makes sense to us to ship an economical iOS-only minimum viable product and rearchitect for cross-platform once it’s clear the investment is merited, so even in the current state CloudKit looks like a pretty big win. And we think it’s a fairly good bet that API and/or export mechanisms are on the roadmap too; it’s rather stretching credulity to think Apple believes they can wall their garden quite that high and still expect developers to enthusiastically embrace the technology. Check back after WWDC 2015, and we’ll see how well placed that confidence turned out to be!

UPDATES:

CloudKit: The raywenderlich.com Podcast Episode 9

Choosing CloudKit brings up the point of data security, at least the user perception of such, that might be not insignificant depending on your intended app:

They will not need to setup another account with yet another set of credentials to manage. More importantly, their data will be stored with Apple, a vendor they have already choosen to trust. It will be stored in siloed, private data stores that not even the developer can access. That cannot be said for apps using Azure, Parse or other backend services.

Web Services, Dependencies, and CloudKit

CloudKit: The fastest route to implementing the auto-synchronizing app you’ve been working on? with Get up and Running with iOS 8’s CloudKit

Beginning CloudKit Tutorial

About iCloud changes in 1Password 5

“…apparently it’s also the API that Apple has always wanted for itself.”

Open Source iOS Library That Simplifies Working With CloudKit

IOS8 Cloudkit Tutorial – Part 1

evermeer / EVCloudKitDao: “Simplified access to Apple’s CloudKit.”

How to Work With CloudKit: Yalantis / CloudKit-Demo.Objective-C and Swift

Working with CloudKit in iOS 8

NSHipster’s CloudKit

CloudKit: What is it good for?

Seam: “Seamless CloudKit Sync with Core Data”

CloudKit: Structured Storage for Mobile Applications

ILSCloudKitManager: “is wrapper for managing apple’s CloudKit operations like create, update, fetch and delete records.”

CloudKitCodable: “An encoder and decoder for CKRecord”

The Case for CloudKit

 

 

Hosted IAP And Receipt Validation

So today we’re adding hosted IAP content to a project for the first time — right out on the cutting edge with those iOS 6 features, that’s us — so that makes it a good time to check out what’s new in the way of IAP support libraries since a long time ago we last had occasion to check out the state of the art. The two we checked out then are:

  • MugunthKumar / MKStoreKit: Seems quiet for the last year, latest README notes “I’m working on In App Purchase hosted content support on iOS 6. It’s implemented, but for some apparent reason, download doesn’t happen.” Next!
  • anystone / AnystoneStoreKit: Also appears to be languishing since initial release, nothing in nine months.

Hmmm. Alright, let’s check on other libraries that we’ve noted the existence of since then:

  • mattt / CargoBay: Fairly active; looks like there’s an open ticket on iOS 7 offline validation; includes hosted download support.
  • ApptitudeNOLA / iTunesConnectHelper: Looks pretty quiet for the last year.
  • dreamengine / DEStoreKitManager: Likewise.
  • robotmedia / RMStore: Somewhat active; only one here supporting -refreshReceiptOnSuccess and other iOS 7 goodies. No hosted download support yet.

And let’s go trawling around to see what other libraries we can dredge up that we hadn’t noted the existence of until now. Making the probably reasonably safe assumption that anybody serious these days is doing a CocoaPod for their project and/or will be listed on CocoaControls, that gives us the new entrants

CargoBay has a couple extensions out there as well:

And here’s a selection of tutorials and snippets regarding the hosting and verification process to help smooth out all the rough edges on your choice (if any) of framework:

Introduction to In-App Purchases in iOS 6 Tutorial

Apple In-App Purchase: Creating App Store Hosted Content

Configuring and Creating App Store Hosted Content for iOS 6 In-App Purchases

In-App Purchase content downloads in iOS6

Updating content when using Apple-hosted content for In-App Purchase

App Store Receipt Validation on iOS 7

rmaddy / VerifyStoreReceiptiOS “parses and validates the payload and the PKCS7 container itself.”

DarkHorseComics / DHAppleReceiptParser “A library to parse the apple receipt file in iOS 7 “

A complete solution to LOCALLY validate an in-app receipts and bundle receipts on iOS 7 — check out the epistle from hpique the RMStore author

Well, adding hosted download support is pretty straightforward looking, and iOS 7-savvy receipt validation is most assuredly not straightforward looking in the slightest, so we’re going to go with RMStore here. It looks very nicely done indeed — check out these slides — for making things simpler without getting in your way a lot, which is a pretty fine line to walk. You may find that line for you somewhere more congruent with some of the other options up there of course; and CargoBay is definitely worth a very close look if you’ve already got (or insist on getting) server side verification. We’re perfectly good with the on-device verification here, because there just isn’t enough money at stake with our handful of IAP options to bother getting overly uptight, so RMStore being apparently the current best available drop-in solution for that floats our boat just fine. And besides, there’s already a pull request for download support — yep, looks just about as straightforward as our guess at doing it ourselves would be — so chances are, by the time we get all the content sorted packaged and uploaded, it’ll be there waiting!

UPDATES:

Monza – Script For Easily Validation iOS In-App Purchases And Subscriptions