Using PHLivePhotoView with Auto Layout

So, I was working on updating my app Memories to support displaying Live Photos properly and not just as a static image. I took a look at the documentation for PHLivePhotoView and thought that this would be fairly straightforward. For Live Photos, I’ll just use a PHLivePhotoView instead of a UIImageView. Well, as is usually the case when a developer says: “this looks straightforward, I’ll have it done in a couple of hours”, it was not quite so straightforward and had me scratching my head and cursing until 2am until I finally realised what I was doing wrong. »

Podcast sponsorship - an experiment

I’m an iOS developer in my spare time. You know, on evenings, and weekends. I recently launched an app called Memories. I created the app mainly because it was an app that I wanted to have. I thought that if I wanted to use an app like this (and I use it every day), then maybe other people would like an app like that too. The app replicates a feature found in cloud photo services like Everpix (RIP) and Picturelife that shows you all the photos you took on a certain date (usually today) in previous years. »

Comparing Dates, whilst ignoring the time

Comparing dates is one of the most common things you have to do as a developer of almost any type of software. At first glance it would seem to be something almost trivially easy. What could possibly go wrong? Well, turns out, quite a lot! I’m going to highlight just one issue that recently caused an embarassing bug in my app Memories. It involved just a simple date comparison, ignoring time, and without crossing timezones. »

Using stride to convert C-style for loops to Swift 2.2

With the release of Swift 2.2 in Xcode 7.3 C-style for loops have become deprecated. The default Xcode fix-it for converting them uses a Range: let count = 5 for var index = 0; index < count; index++ { doSomething(index) } is converted do: let count = 5 for index in 0 ..< count { doSomething(index) } For the vast majority of C-style for loops this will work perfectly well. »

Apple vs the FBI

The details of this case have been broken down and explained extremely well by Ben Thompson. The more technical details have also been very thoroughly covered by Jonathan Zdziarski on his blog. I am clearly on Apple’s side in this battle, and very much hope that they don’t lose. However, it’s worth pointing out that if they were to lose, that is, if they were compelled to provide a mechanism to facilitate brute force pass code cracking it wouldn’t be a total disaster. »