A collection of primarily development-related posts, about issues that I encounter and how I fixed them. Hopefully should be helpful for other developers!
  • Good Practices for RxSwift-based View Models

    Everyone has their own preferred way of structuring their app code. I have grown to like view models and RxSwift. I am not trying to convince anyone to use it with this post, but rather want to share my best practices that took me a few years of using RxSwift to settle on more…

  • Getting push notifications for fastlane errors

    Fastlane is an excellent and essential tool for app developers to automate many of the otherwise time-consuming, tedious tasks. With a simple terminal command you can make run all the steps from compiling and packaging an app, to uploading it to the app stores, updating release notes, uploading the change log on a web page, to basically whatever else you can imagine. These tasks can take a while to run, so you want to know early when they fail. more…

  • Sharing iCloud Drive documents from your app

    I’m building a document-based iOS app for which I want to add sharing and collaboration features. Where possible, I try to use native iOS frameworks and features. When it comes to files, this means using iCloud Drive. This made me investigate how to build sharing and collaboration features on top of iCloud Drive. more…

  • RxSwift in custom views, the clean way

    RxSwift let’s you update your views dynamically in your app in many ways – many of which can get messy over time, as I’ve learned the hard way. The approach that I got used to in order to update views dynamically (and without resorting to crash-prone key-value-observation) was to pass Observables to the views. The views then subscribed to them and cleaning up o their own using a DisposeBag. It worked, but closely coupled the views to RxSwift. RxSwift has a much cleaner way for doing this – a Binder. more…

  • Importing app module in unit test fails to compile

    For months, CI and Xcode unit tests for a project at work have been plaguing me with a strange issue: At times and without obvious cause, some unit tests started failing to compile, saying that the classes of the app’s module could not get found – lots of Use of undeclared type and Use of unresolved identifier errors. more…

  • Lessons from Converting Complex Submodules to Cocoapods

    I have recently converted two fairly large iOS libraries (written in a mixture of Objective-C and Swift) from a plain git submodule to a set of dynamic frameworks that can be used as Cocoapods. The process was quite tedious, so here’s a random collection of hurdles that had to be crossed. more…

  • Upload Rejected Due to CFBundleResourceSpecification

    When submitting a new build to the App Store today, iTunes Connect greated me with a error that the build was rejected due to the use of CFBundleResourceSpecification in the Info.plist file. more…

  • Custom Transitions For Pushing Container View Controllers

    A common user interface paradigm in TripGo is to provide a list view with an associated map view. On the iPhone we display them on top of each other, while on the iPad we display them next to each other, which we have achieved by using separate storyboards for both devices. However, maintaining two storyboards has a number of downside and with iOS 9 around the corner, that adds the ability to show apps side-by-side, it is time to kiss goodbye to this approach. After briefly investigating the now more powerful UISplitViewController, we are now saying “Hello” to the magic world of trait collections, custom transitions and container views! more…

  • Drawing Multi-coloured Lines on an MKMapView

    MKMapView is a great toolkit to customise and add a variety of things to a map on iOS, but one thing that I found lacking was an easy way to draw a multi-coloured line. Specifically, I wanted a way to draw a border around a line but the standard MKPolylineView component does not allow doing that. As digging around on GitHub, Google and StackOverflow did not yield any existing projects that allow doing so, I have a look for how to do it and the result is ASPolylineView - a simple drop-in replacement for an MKPolylineView. more…

  • iOS, AddressBook Framework and GCD

    For my latest iOS app I was working on an autocompletion field that hooks into the user’s phone address book and calendar. This is a great way for making the user feel at home in your app and makes your app feel part of the phone. At first I tapped into the AddressBook and EventKit frameworks on the main thread while the user is typing, but that lead to a rather unresponsive user interface since both the AddressBook and EventKit frameworks can take a short while to access the contents. So, that work should be done on a background thread, while keeping the main thread available to respond to the user’s typing. more…