Under The BridgeUnder The Bridge

Career Planning: Letter To A Young Developer

So we had this request for advice show up this week, and it strikes us as a good topic for some crowdsourced wisdom from our Dear Readers:

Hello Alex I am currently a senior in high school and want to pursue a career in mobile development after high school.

An excellent choice indeed!

I know the common route most developers take is going to college and obtaining a CS degree but college is very expensive and theory based for a field that doesn’t necessarily require a degree.

Make that ridiculously expensive, in the US these days, and somewhat tenuously connected to skills actually needed for a career in mobile development, this is true.

However, there are a great number of opportunities gated by that credentialism — most notably, it’s far easier to get a job and/or residence abroad if you do have a degree, and we’re big fans of travel as you may notice on our other blog. So before completely dismissing the college option, look into the option of taking a degree program in a country that doesn’t charge US prices, here’s a good looking start we googled up:

Where Can You Study Abroad for Free?

You might also consider looking for universities that offer co-op programs, like our alma mater Simon Fraser University. Having the university place you in work terms makes the financial burden a great deal less, plus once finished you’ll have enough of a résumé to have no problem getting hired — especially since a good co-op program will get you placed at companies far more impressive than you could land on your own; by the time we finished our degree we’d had terms not only in British Columbia where SFU is, but in Ontario, Maryland, and England.

I’ve heard of attending Bootcamps but I’m not sure of the success rate in landing a job afterwards.

From what we gather the majority could be not unfairly characterized as “worthless ripoffs,” yes. And never heard of one we’d recommend for the educational value alone compared to just learning by doing your own projects, which is how we prefer to learn … well, anything, really.

However, we also gather that there are a good number of employers that treat bootcamps as a way of preselecting entry level employees, on the theory that getting through it successfully is as good a screen as their own HR could do; pretty much like the co-op programs we recommended above. So, we do recommend you give the bootcamp thing serious consideration … but only bootcamps that offer 100% refund if you fail to land a job in short order. Here’s a start on that:

Guide to Coding Bootcamps with Job Guarantees – Course Report

What path would you recommend me to take?

Well, if I was a senior in high school right now, what I would personally be doing is throwing up a landing page for some wacky Bright Idea™ and applying for a Thiel Fellowship.

The Thiel Fellowship gives $100,000 to young people who want to build new things instead of sitting in a classroom.

College can be good for learning about what’s been done before, but it can also discourage you from doing something new. Each of our fellows charts a unique course; together they have proven that young people can succeed by thinking for themselves instead of competing on old career tracks…

…The hardest thing about being a young entrepreneur is that you haven’t met everyone you’ll need to know to make your venture succeed. We can help connect you — to investors, partners, prospective customers — in Silicon Valley and beyond.

You may have noted above we prefer to learn by doing our own projects? Well, doing our own projects for a couple years with 100 large of Peter Thiel’s money, that strikes us as the best scholarship there is out there.

Failing that, I’d take a look at guaranteed co-op/bootcamp options like we linked to above and see if any of them suited my available financial resources.

And failing that, the next thing I would do is spend full time teaching myself and creating a public profile — which is a good idea to get started on right away no matter what! — but is how you’re going to make up for your lack of experience and credentialism, by substituting with a portfolio and community stature. Here’s a rough outline:

  1. If you don’t have a Github profile, create one now
  2. Start looking for Open Source projects you can contribute to
  3. If you don’t have a Stack Overflow profile, create one now
  4. Start answering questions on Stack Overflow
  5. Build your own mobile projects, open sourced on Github — trivial projects, to start you simply want to show you can ship something
  6. Start a journal somewhere, we like WordPress as you can tell here but Medium seems to be a popular choice in the mobile developer community, and post a couple times a week or so about what you’re learning, the SO questions you’re answering, how you’re approaching your own projects, whatever

Doing that full-time for a couple years, we confidently predict, will

  • teach you much more than any formal education would
  • provide an Open Source portfolio, a much better credential for sensible employers than any piece of paper is
  • do a better job of networking in the community for serendipitous opportunities than any likely school will

If that sounds just a bit overwhelming to go figure out on your own, we also noticed this week a book which looks like a comprehensive guide to exactly what we recommend:


Forge Your Future with Open Source

Build Your Skills. Build Your Network. Build the Future of Technology

Free and open source is the foundation of software development, and it’s built by people just like you. Discover the fundamental tenets that drive the movement. Take control of your career by selecting the right project to meet your professional goals. Master the language and avoid the pitfalls that typically ensnare new contributors. Join a community of like-minded people and change the world. Programmers, writers, designers, and everyone interested in software will make their mark through free and open source software contributions…

So, although we haven’t read it, just going over the table of contents makes us believe that this would be an excellent $18.95 investment in planning your career, no matter which path you choose to take!

I appreciate you taking time to read my question, thanks!

And you’re very welcome. How about you, Dear Readers? Have any better, or at least different, advice for our young friend?

2018 iOS Conference Calendar

So since we had such fun with that ARKit speech at MBLTDev in Moscow last fall, we’re thinking of looking for some more exotic conference destinations this year, so let’s see what’s out there for the prospective presenter, shall we?

(Or just to visit, if you’re looking for something vaguely industry-related to justify some extra time off … or are the type that figure an industry conference IS a vacation!)

JANUARY:  (yes, we know it’s over; just making notes for next year)











DECEMBER: none yet! 

Anything we missed — let us know! Bit late to be getting started for this year, seeing as how we’re well into February and all … but soon as we hear about CFPs opening up for 2019 conferences, we’ll do another one of these for next year giving you lots of time to submit your papers!


CocoaConferences and Twitter list

API 4 IAP PIA: SwiftyStoreKit Seriously Simplifies Subscriptions

There’s been quite a bit of angst and snark recently about what a pain in the fundament it is dealing with IAP subscriptions, you may have noticed:

Testing In-App Purchases Ruins Your Phone

Getting in-app purchases right is a goal that every app developer should have. Your customer’s experience when handing over their money should be seamless. To guarantee a good experience you must rigorously test. However, there are many pain points involved in doing this. Each individual issue is only irritating, but together they create enough friction that properly testing in-app purchases is a miserable experience…

My personal least favorite when working with recurring subscriptions: If you make a test purchase of a recurring subscription, you will be forever presented with a looping App Store login modal, usually when unlocking your phone. This renders any personal device you are testing on ruined… This is a common problem … which some people give short shrift:

My thoughts on the trending iOS subscriptions loop login complaints: read the documentation carefully and follow @Apple best practices. You’ll never encounter this problem.

Well … they’re not quite as clear as all that, really. Here is an excellent guide to the travails you’ll face:

Testing Auto-Renewable Subscriptions on iOS

Subscriptions work differently in TestFlight, the sandbox, and live on the App Store, so testing them requires knowledge of those differences. This is my attempt to help sort out the mess and document it for others to reference…

You definitely want to Read The Whole Thing™ on this one, but we’ll highlight this hack we did not know for testing live subscriptions on the App Store before release! No, really, you can do that:

For an app that has yet to be released on the App Store, getting an early version of the app approved is a great way to test subscriptions:

1. Submit a beta version of the app to App Review. Make sure to set “Version Release” to “Manually release this version” so that the app is not released on the App Store. 2. Generate promo codes for the app. This can be done for free apps that are approved, but not yet on the App Store. 3. Download the app from the App Store using a promo code. 4. Subscribe.

Since this app has gone through approval, subscriptions will perform exactly as they will when the app is live on the App Store, including charging testers who subscribe and allowing testers to manage the subscription in the App Store app. Promo codes can be given to testers so that they can test the app for free. Subscriptions paid for via promo code work exactly like paid subscriptions, except that they don’t auto-renew… Definitely want to make sure you do that. Surprises with your monetization are the worst kind of surprise, amirite?

Now, on the programming side, we feel there’s a clear best practice currently for implementing your StoreKit support in general, but particularly for subscriptions:

SwiftyStoreKit: “Lightweight In App Purchases Swift framework for iOS 8.0+, tvOS 9.0+ and macOS 10.10+”

SwiftyStoreKit Preview


  • Super easy to use block based API
  • Support for consumable, non-consumable in-app purchases
  • Support for free, auto renewable and non renewing subscriptions
  • Receipt verification
  • iOS, tvOS and macOS compatible

It’s been actively maintained up to 2 days ago as we write this, with 2733 stars on Github and 26,536 installs on CocoaPods.org — it’s healthy to be leery of introducing third party dependencies to essential parts of your app flow, but this one is downright mainstream at this point. And it comes with a complete background education:

Essential Reading

  • Apple – WWDC16, Session 702: Using Store Kit for In-app Purchases with Swift 3
  • Apple – TN2387: In-App Purchase Best Practices
  • Apple – TN2413: In-App Purchase FAQ (also see Cannot connect to iTunes Store)
  • Apple – TN2259: Adding In-App Purchase to Your Applications
  • iTunes Connect Developer Help – Workflow for configuring in-app purchases
  • Apple – About Receipt Validation
  • Apple – Receipt Validation Programming Guide
  • Apple – Validating Receipts Locally
  • Apple – Working with Subscriptions
  • Apple – Offering Subscriptions
  • Apple – Restoring Purchased Products
  • Apple – Testing In-App Purchase Products: includes info on duration of subscriptions in sandbox mode
  • objc.io – Receipt Validation

I have also written about building SwiftyStoreKit on Medium:

  • How I got 1000 ⭐ on my GitHub Project
  • Maintaining a Growing Open Source Project

So there you go, that should be all the resources you need for as painless an IAP implementation as possible!

And while we’re talking about IAP, there is a most excellent article here on design, psychology and strategy:

The Ultimate Guide To Mobile In-App Purchases Optimization

Now you can’t just create in-app purchases in your app haphazardly and let it run itself. It’s a long process that requires blood, sweet, and tears. You need to optimize your in-app purchases to make sure that you’re getting the most that you can out of them.

There are many different models, techniques, and strategies that the top-grossing apps and industry leaders use to optimize their in-app purchases and increase their revenue and we’ll be discussing all of the main and most popular ones… There’s not much here that will be completely new to you, especially if you play those pay-to-win games that have taken over the App Store these days; but it’s nice to have a concise compendium of best practices that’s up to date with iOS 11’s App Store IAP promotions to refer to. Our fave tip:

Purchases IRL

If your mobile app or game becomes big and popular enough, you can use that to offer real-life merchandise through your app. This had been the case with hit mobile games like Halfbrick’s Fruit Ninja and Jetpack Joyride that sell t-shirts and mugs through their games and Rovio’s Angry Birds that sells t-shirts, hats, toys, LEGO sets, backpacks, and more, and even went on to make an animated series and a full feature movie… That’s an interesting idea actually; if you have all this game art, why not make swag out of it? We do every so often get asked if we have shirts with the Trollsheep on them … maybe we’ll look into that. Especially now that we live in Southeast Asia and all where swag production is a thing!


Apple Will Reject Your Subscription App if You Don’t Include This Disclosure iOS Subscription Groups Explained Castro 3’s Business Model

AppReceiptValidator: “Parse and validate App Store receipt files.”

iOS Introductory Prices

App Store Subscriptions And You 

IOS In-App Purchases and Subscriptions

CI + CD: Looking For A New Buddy?

So first off, congratulations to our ex-neighbours (before we moved to Bangkok and all) for becoming another Vancouver company acquired by Apple!

The buddybuild team is now part of Apple!

We’re excited to share that the buddybuild team has joined the Xcode engineering group at Apple to build amazing developer tools for the entire iOS community.

We’ve always been proud to be a Canadian company, so we’re also pleased that we will be staying right here in Vancouver — a hotbed of developer and engineering talent.

The buddybuild service will remain available to existing customers to build, test, and ship iOS apps to testers through buddybuild.com…

SWEET! Big win all around, right? Right?

As of today, we are no longer accepting new customers. Existing Free Starter plans and Android app development will be discontinued on March 1, 2018…

… oh. So if you’re a little indie and/or you have an Android version, not so much then.

Well, while we can hope that this promises that our developer memberships may be including some level of CI service in the nearish future, it’s just about a guaranteed certainty that the Android side is about to become just as much a dimly remembered history as that of TestFlight. Looks like just about the same scenario in fact, only difference this time is they announced Apple’s acquisition first!

So, let’s take a look around at what options there are for the indie developer who feels the pain of those free + Android plans going away, shall we?

Here is one particular instance of that discussion being conducted online, as an issue for GitHawk:

Alternatives to Buddybuild? #1330

We will almost certainly lose support for this project. Time to find a new CI. Any suggestions?
I’m reading this article which offers:

Travis CI

I read about Buildkite and AppCenter on Hacker News.

I’m also considering open source, self-hosted solutions so that something like this doesn’t happen again:


Read through the whole discussion there: other options that showed up were

No strong consensus there, although Bitrise and Circle have positive buzz and Travis doesn’t, that’s what stands out.

Circle has an article here:

Migrating from buddybuild to CircleCI

If you enjoy managing everything with fastlane, looks like that’s the service for you. Those of us who want the magic to just work, we’ll keep looking a bit.

Here’s another fellow who went through the evaluation process and came up with a surprising answer:

Exploring Alternatives to buddybuild

In the end, I chose to go with GitLab CI. GitLab CI works very similarly to BuildKite: it merely coordinates a set of agents (“runners” in GitLab parlance), who are responsible for the actual building of the project. I’m already running a GitLab server to host my Git repositories, so using it for CI didn’t require any new installation or setup for my existing repositories…

… As I said above, GitLab CI is almost certainly not the right solution for your case. It’s the right solution for me, because a) it’s cheap, b) I was already running a GitLab server, and c) none of the other alternatives fit my needs quite as well.

OK, if you’re using GitLab, self-hosted or not, that looks like the really obvious choice!

How to set up GitLab CI for iOS in three relatively simple steps

While GitLab is a fascinating option, we expect that Github is where indie projects are likeliest to live … ours, anyways. And, as you may remember, we were kinda impressed with Microsoft’s plans for Visual Studio App Center, and haven’t had any reason to go back on that since. And in what is possibly not a complete coincidence, they recently posted

Build Any App with Visual Studio App Center

At Microsoft, we strive to deliver the best developer tools on the planet in order to help make all developers more productive. With Visual Studio App Center, you can easily automate your DevOps lifecycle to continuously build, test, release, and monitor your apps on every platform, so you have more time to focus on your users and their experience.

The App Center Build service is completely free for your first 240 build minutes per month (up to 30 minutes per build) and supports iOS, macOS, Windows, and, of course, Android apps.

App Center supports apps written in Obj-C, Swift, Java, React Native, and Xamarin, and integrates with existing tools such as GitHub, Visual Studio Team Services, and Bitbucket. Once you’ve selected your repository, setting up build automation for any branch of your desktop and mobile apps takes just a few clicks. Additionally, App Center Build includes other cloud services, so you can run UI tests to retain the highest quality standards and distribute your apps to testers…

That’s the one we’re going to try next, personally; find out for ourselves just how usable in practice App Center is, because it sure looks like the best multiplatform development support out there, and one that we can trust has just about as low a probability as possible of being acquired or discontinued … which seems to occur with depressing regularity to these tools of ours, doesn’t it now?

And as a parting note, here’s some more informed commentary and interesting speculation for WWDC 2018. Cloud Xcode Server would certainly be nice!

Apple Acquires BuddyBuild. Oh, My Xcode Server!


Adding GitLab CI Support (followup to Exploring Alternatives to buddybuild)

Continuous integration and delivery with fastlane and CircleCI

Why XOD switched from Travis to Circle CI

Looking for Buddybuild Alternatives? Try App Center

Three Quick Tips: Signing Your iOS Apps with Visual Studio App Center Build

Reality and AReality: The Russia Files

Been a while since we got around to making a post here — these days, if you want to keep up with what we’re doing you have a much better chance of doing it over at our travel blog everywhs.com … or following @everywhs on Twitter … or subscribing to us on Youtube … or Instagram … or Facebook … or even Pinterest. Yep, we’re giving a full on shot at this “travel influencer” thing.

We have started to get a bit of the hang of what we’re doing over there though, so we will be posting here a bit more frequently. For starters, let’s catch up with where we left off telling you we’d been invited to Moscow for MBLTDev! We are fairly blasé about the regular run of shows … but one in Moscow? Now that’s fun! And it went pretty well considering, we talked up on it a bit here over on the new blog:

MBLTdev 2017, Moscow

The Reality Side of AR

Yep, there we are with our audience participation ARKit demos in progress, wearing our new signature Indonesian batik dragon presentation shirt. Want another look?

MBLTdev 2017

More photos in this Facebook album, and if you’d like to check out the slides, they’re the first download here on Google Drive; the video itself appears to be restricted to participants, or at least people with an MBLTdev account, but if you do, hey check it out.

If you’d like to take a look at our demos, they’re up on Github:

ARSelfie: Demonstrates adding an SKLabelNode to a tapped ARAnchor in an SKScene with the current top result from a classification MLModel

ARWorld: Demonstrates adding an SCNNodev collection to an ARSCNView representing the results of an MKLocalSearch for nearby POI.

ARCloud: This was the … overenthusiastic … stretch goal here, we’d planned some Really Cool persistent presence demos using the Estimote gear, as iBeacons are one of those things we’ve never quite had the opportunity to get into as much as we wanted to, so this was a good excuse! Well, that didn’t quite work out; we went to our Plan B of just shoving some ARKit glitter on top of a stock proximity detection sample pretty much. But it all came off amusing the audience to all appearances, so hey we’ll call that a win.

So that was a great change in every way from the glorified product demos that have tended to mark our speaking career so far, and it was definitely a good conference all around; if you have a hankering to visit Moscow, definitely recommend you plan it around an MBLTdev conference!

Hello WRLD: VR Developer Challenge

So ARKit by itself is pretty interesting, and adding Core Location to it gets even more interesting, but for the perfect trifecta, what do we need? Why, we need a VR world, so that we can explore real world locations without actually being there, amirite?

Well, turns out there’s an SDK for that: WRLD!

A dynamic 3D mapping platform for smart cities and buildings, gaming, AR/VR experiences, and more.

Apparently they’ve been around for several years as “eeGeo”, but the much improved rebranding is new:

We are excited to announce today our rebrand of eeGeo to WRLD. We believe the name reflects the scope and breadth of our vision, which is to build an immersive 3D world to visualise and interact with every thing on the planet.

We’ve set an ambitious goal with our new name and vision on purpose. We can’t do it alone, as we globally operate as a collaboration between partners and our developer community. We’re committed to providing the best tools to build fully immersive experiences that benefit users in numerous ways – greater spatial understanding and decisioning, smart cities and building planning, or just creating awesome location-based games and VR experiences…

Yep, that’s pretty darn interesting. We’d already had some interesting ideas for how to mash up ARKit with real world locations, but were kinda stymied by the “well, it would only be interesting if you were actually there…” thing. But if you could take your informational ARKit app and place it in VR world instead of real world, well that gets rather more interesting, doesn’t it?

And as it happens, there’s an opportunity to get some recognition for your experiments:


What if you had the WRLD at your fingertips? What would you create?

WRLD is hosting a global challenge for developers to create the most useful application or immersive experience using any of the WRLD SDKs.

Contest starts October 1st and final submissions are due December 31st.



Hello WRLD Challenge


So there you go, have at it!

iPhone X Notch-alance

Remember those innocent days a few short months ago when we all spotted the new safeAreaLayoutGuide and thought

Our constraints are now with the top and bottom anchors of the safe area layout guide. This is not a big change…

Oh, sweet naiveté. Did anybody actually call out in advance that subtle little change was foreshadowing THE NOTCHALYPSE? Yes, yes, every time something changes it brings out the fear and loathing no matter what it is, but the level of OMG NEVER BUY APPLE AGAIN … we saw this time, that was unprecedented. Personally, we think a phone with a bat-eared screen is kinda neat, but we’re weird. 

There’s a certain level of enthusiasm out there for clipping and masking and otherwise working around the new roundedness and notchedness … but we think Marco has it right here:

This is the new shape of the iPhone. As long as the notch is clearly present and of approximately these proportions, it’s unique, simple, and recognizable.

It’s probably not going to significantly change for a long time, and Apple needs to make sure that the entire world recognizes it as well as we could recognize previous iPhones.

That’s why Apple has made no effort to hide the notch in software, and why app developers are being told to embrace it in our designs…

So, we’ve got some rewriting to do in the next few weeks to have our apps fit nicely into The Brave New Notched World, and you probably do too we imagine; let’s see what resources are out there!

First off, go over the relevant stuff over at the mothership:

Building Apps for iPhone X

Designing for iPhone X

Updating Your App for iOS 11

Human Interface Guidelines — iPhone X 

Positioning Content Relative to the Safe Area

The great PaintCode people have updated their invaluable 

The Ultimate Guide To iPhone Resolutions

and also have specs for all the Notch attributes at

iPhone X Screen Demystified

More good reads on upgrading UI for the X at

Design for iPhone X

Supporting iPhone X

iPhone X: Designing for the Notch

iPhone X: Dealing with Home Indicator

UI Design for iPhone X: Bottom Elements

How iOS Apps Adapt to the iPhone X Screen Size — and the Adaptivity app showcased here looks like a good purchase!

Adaptivity is an app for developers and designers to visualize how iOS’s Size Classes and margins for layout and readable content look on real devices and how they change with respect to orientation, iPad Slide Over/Split View and Dynamic Type size changes…

Templates to help you out at

Apply Pixel’s iPhone X and iOS 11 UI Kit

iOS Design Kit’s Free iOS 11 GUI for Sketch

If you’re concerned with how your web sites will deal with the Notch, check out

Designing Websites for iPhone X 

Understanding the WebView Viewport in iOS 11

And let’s finish off with the niftiest idea we’ve seen for adapting in a non-approved way with the Notch:

ScrollSnake: “What if scroll bars on the iPhone X worked like the game “Snake”?”


UI Design for iPhone X: Top Elements and the Notch

Designing for iPhone X: Guidelines to designing for iOS 11

Challenges of Supporting iPhone X

Fix for the missing network activity indicator on iPhone X

The Reality Side of AR

Got any plans for Friday October 27th? No? Well, that’s a great time for a vacation in Russia, and if you’re around Moscow that day, check out this conference: MBLTdev!

MBLT 2017

That first speech on the programme, that looks like a particularly good one:

Yes, we’re making our outside-North-America speaking debut by leading off the programme here, no less. OK, pressure’s on to make this a particularly good one then!

The basic idea is to take this trenchant observation on the initial release of ARKit

… and well, since he’s quite right, why don’t we just start doing something about that?

It seems that iBeacon technology has kinda languished — at least, if there are any killer apps out there, we’ve managed to miss them — but ARKit seems like just the thing to make a combination which is awesome, doesn’t it?

Well, visit MBLTdev in Moscow October 27th to find out just how good a job we do of pulling that off!

Validate My Experience

So we’re looking at updating one of our apps here for iOS 11 and joining the move to subscriptions which it appears is the only reasonable path to sustaining a productivity app on the horizon, so we’re seeing what’s new in receipt validation to support that, as last time we checked into it was four years ago and all and RMStore we picked then has languished since.

Let’s look around a bit … hmmm … hmmm … oh, what’s this? A comprehensive series walking through the whole process, updated for Swift 3? Well, bit late to the party, but looks like it’s all still relevant, and receipt validation code is something we really ought to write ourselves:

Preparing to Test Receipt Validation for iOS

After having to piece together each step along the path of preparing to test receipt validation for iOS apps, I’ve decided to combine everything into the following guide. Whether you’re working to implement receipt validation for a new iOS app, or for an existing one, this walk-through should provide guidance to get you ready to work with receipts in your iOS application…

Loading a Receipt for Validation with Swift

There are at least 5 steps to validate a receipt, as the Receipt Validation Programming Guide outlines…

Extracting a PKCS7 Container for Receipt Validation with Swift

Before attempting to work with OpenSSL’s PKCS7 functions, you’ve got to do a little prep work to get the functions to play nicely with Swift. Unfortunately, Swift doesn’t work well with C union types. It simply can’t see things defined with a C union…

Receipt Validation – Verifying a Receipt Signature in Swift

The aim of this guide is to help you take a look inside the PKCS #7 container, and verify the presence and authenticity of the signature on the receipt…

Receipt Validation – Parse and Decode a Receipt with Swift

The aim of this guide is to help you parse a receipt and decode it so that you have readable pieces of metadata to inspect and finalize all of the receipt validation steps…

Finalizing Receipt Validation in Swift – Computing a GUID Hash

After finishing this guide, you’ll simply need to use the parsed receipt data to perform any app-specific enabling/disabling of features based on the data within a valid receipt. If the receipt is invalid, you’ll need to handle that as well. But all of the relatively difficult work of working with the Open SSL crypto library will be DONE after this guide….

… The bottom line is that from this point on, you no longer need Open SSL or any additional cryptic, low-level, unsafe pointer-type stuff to finish things out. I hope this series has been helpful in setting you up to validate receipts locally on a user’s device!

That … is a veritably monumental guide to the validation process. And conveniently finished up right when we need it too, thanks ever so much @andrewcbancroft!


We just beat by a day Messr. Bancroft pulling together his own collection guide, now that you’ve read ours go to the real thing!

Local Receipt Validation for iOS in Swift From Start to Finish

and code at SwiftyLocalReceiptValidator!


InAppPurchase – A Simple Swift Library For In-App Purchases With Support For iOS 11’s Promotion Features

YapDatabase: Ditch Core Data

The choice of database technology for our apps has been something of a question for us the last while, where by “last while” we mean since iCloud Core Data was deprecated, which miffed us no end since we’d rather like our apps’ initial releases to Just Work™ across devices for iOS users without jumping through any great hoops or introducing any dependencies on non-Apple services.

So let’s see what’s new in Core Data this year in the iOS 11 release notes! Errr… nothing?

Hmmm. Let’s check out the What’s New In Core Data WWDC 2017 session

kinda thin, don’t you think?

Hmmm, hmmm. Sorta looking like it’s time to seriously evaluate other alternatives, it is.

We liked the looks of RocketData, very Swifty and all, but it … appears to be languishing.

Soooooo, what to do? Well, here is an article that presents an alternative of interest:

Ditching Core Data

I have been using Core Data since iOS 3.0. With few exceptions, it has served entirely as a network cache. Take data from a network response, turn it into a set of objects, save those objects, and update the user interface. Rinse and repeat.

The stack is pretty simple. A set of nested contexts to keep object building off of the main thread, a couple of models that have init(dictionary: NSDictionary), and some find-or-create helpers can get you a long way. The problem is that the apparent simplicity comes with an incredible amount of baggage. Instability, buggy classes, and outdated APIs make building modern apps difficult.

As a community, we have tried to solve these problems by building wrappers around Core Data. These wrappers add their own issues and none of them hide the fact that Core Data was simply not meant to be used like this…

Nodding along here? Yep, us too.

After some research and planning, I landed on a set of features that I wanted in a persistence framework. The list is pretty short:

  • My objects must be plain objects. Requiring model objects to extend a certain base class is painful; especially when you cannot see the source for those classes. I want to know that I can create objects however I like, use them wherever I like, and build my own functionality around them without worrying about what sandbox they belong to.
  • I should not have to worry about concurrency. Tools like closures, Grand Central Dispatch, and NSOperationQueue make it easy to write code that spans many threads. Unpacking objects on background threads that are later used to update interface elements is a common operation that should be simple and easy to reason about.
  • I should not have to write migration code. Frameworks and libraries can and should be smarter than this. Let me describe how I want the database to look. You take care of the rest.
  • I should be able to track and respond to atomic changes. Elements in my application should be able to reload themselves if a single object, or a collection of objects changes. Otherwise it may spend too much time updating things that may not need to be updated, which could have a negative impact on the user experience.

Sounds good. Only thing we’d add as a base requirement is “CloudKit sync” to make the cross-device experience seamless.

And the winner was:

I decided to use YapDatabase. It came highly recommended and it offers support for all of my requirements. YapDatabase is, at its core, a key-value store build on top of SQLite. It has a simple API and is incredibly flexible…

You will notice a few things about my model objects right away: they are completely immutable, they have no knowledge of the persistent store, and no magic superclass. These objects can be passed around the application (and across thread boundaries) without requiring knowledge of the database or how these objects are to be handled…

All database operations in YapDatabase are handled through database connections. YapDatabaseConnection has functions for reading from, writing to, and responding to individual changes in the database. It does all of this in a thread safe manner. One less thing to worry about!

OK, flipping down the feature list there, looks like a solid solution to entry level needs, got a track record and is being easily maintained, just that one little extra base requirement…

• Sync. Support for syncing with Apple’s CloudKit is available out of the box. There’s even a fully functioning example project that demonstrates writing a syncing Todo app.

… well, there we go then. Unless some dramatically superior alternative comes to our attention, next data-storing app we ship will use YapDatabase too, farewell Core Data!