Author: rbritton

Portfolio for iPad 4.5.0

Portfolio 4.5.0 is a big update but hopefully one that will mostly go unnoticed. It doesn’t bring any new, shiny features — rather, it enhances, refines, and fixes existing ones. The sync engine was the primary target with this update. It was written in a day when dealing with asynchronous code paths in iOS meant using NSLock and subclasses. Rewriting…

Things Not Allowed in the Mac App Store: Interacting with Finder via AppleScript

A recent client project (an OS X app) had some functionality that included acquiring the path to the frontmost Finder window. The only way to get that path is via AppleScript: tell application “Finder” set frontpath to POSIX path of (target of window 1 as alias) end tell Using AppleScript in a sandboxed app requires an entitlement. The official one…

Unique Layouts for iPhone and iPad with Size Classes

Introduced in iOS 8, UITraitCollection added the concept of size classes to the iOS autolayout system. As we found out a year later in iOS 9, the primary purpose of these was to allow for adapting the interface layout for multitasking. The default size classes look like this: Unfortunately, this isn’t very useful if you’re looking to tailor the UI…

Improving Sync in Portfolio

Sync is one of the notoriously hard problems in computing. There are all kinds of edge cases that have to be accounted for lest they throw the data into an ambiguous state. It comes in multiple flavors and with a variety of needs, but all of them eventually boil down to one goal: ensuring the local copy of the data…

NSUserDefaults Stops Functioning

While working on a project for a client (updating an OS X app), we ran into a problem that we first thought was a bug in the app itself. Entire portions of the interface were completely non-functional but only on the client’s machine. I inherited large portions of technical debt with the project, so I figured it was just something…

Portfolio for iPad 4.1.4

Portfolio 4.1.4 is a relatively small update, focusing primarily on fixing a few elusive bugs related to the gallery list in the content manager. It also brings an iPad Pro-sized icon now that Xcode finally supports setting one (why that was not possible to do prior to the iPad Pro’s release I have no idea). Release Notes Fixes The gallery…

NSNotificationCenter and Selectors in Swift

Selectors are a native type in Objective-C (SEL). Not so in Swift, where the type is currently represented by what amounts to a String (technically the type is Selector, but in actual use it is currently indistinguishable from a regular String). Objective-C benefits from this primarily in Xcode — the compiler is able to both provide autocomplete for most selectors…

Adventures in Swift – Sun & Moon

As I write this, I have just pressed the submit button on my first app written in Swift: Sun & Moon. I covered it briefly before, but in short, it’s an app for checking the rise and set times of the sun and moon either locally or at a city somewhere on the planet. It was a project both to…

Swift Namespacing and Sharing Code

In the old days of iOS and OS X development, “namespacing” meant prepending Objective-C class names with a (hopefully) unique prefix to avoid conflicts. Swift mostly removes this need by providing automatic namespacing at the module level, though this can introduce an additional consideration. Recently I began adding a Today Widget to an iOS app and ran into an odd…

Estimating Complexity in App Development

As the App Store has matured and its revenue streams diminished, I have needed to pursue consulting jobs to bolster my income. Unlike working fully for myself, clients want (quite reasonably) an estimate of what a job is going to cost before signing off to begin the work. Unfortunately, in software development, accurate estimates are notoriously the hardest things to…

Portfolio for iPad 4.1.3

Portfolio 4.1.3 is (hopefully) the final iOS 9 compatibility update. It’d definitely be nice to be able to get it all in one go, but there always seems to be some edge case hiding in a new iOS release. This update also includes performance enhancements for browsing thumbnails, rendering improvements for the iPad 2, video playback improvements, and a potential…

Towards a Better App Store

The iOS branch of Apple’s App Store opened seven years ago in 2008 with the release of iOS 2. In that time developers have been anything but shy when expressing their dissatisfaction at the seemingly stagnate state of the store’s functionality. Requests for trials, paid upgrades, the ability to respond to reviews, direct contact with customers, and numerous other enhancements…