I recently had to dig into biometrics on iOS and thought I would write some things down, mainly for the benefit of Future Me. Process # Apple’s documentation has a good walkthrough of how to use biometrics to authenticate a user in your app . The process boils down to: Add NSFaceIDUsageDescription to your app’s Info.plist . This string is shown the first time your app attempts to use Face ID. If…
There was a lot of discussion at the end of 2020 about Uber’s mobile apps, largely due to a Twitter thread by McLaren Stanley. Many wondered aloud why we didn’t just refactor the app instead of rewriting it. I thought I’d add some context into where things were prior to the rewrite. In the beginning… # I joined Uber in December of 2013, shortly after “Guinness” (a redesign of the app) launched. I…
I started writing this post nearly 5 years ago, as I was starting to play around with Elixir and Phoenix. I’m publishing this to push me to finish writing the rest of the series. I’ve recently been exploring Elixir and Phoenix . As an exercise I decided to write an app to poll BART train arrival times . I’ve done this in a couple of languages now, so it was interesting to see how Phoenix, Elixir,…
I was working on an app in SwiftUI today, and one of the problems I ran into was how to add a button to toggle the sidebar. You can add SidebarCommands to your scene (via the .commands modifier) which will add a “Toggle Sidebar” item to the “View” menu, but there didn’t look to be a built-in way to add a button to do the same thing to the toolbar. Creating the button and adding it to the toolbar…
Background # Some years ago I worked on v2.0 of the Fly Delta app for Delta Air Lines. As an initial part of that effort, we mapped out the data model of what we would need in order to support all of the features that were planned. When it came time to start implementing, we instinctively reached for Core Data and ended up building out a moderately large Core Data model. Unfortunately, we ran into…
If you’ve ever used agvtool to manage versioning your project you know it’s a pain. Among other complaints, I’d rather not have version information buried in project files (or have to modify that project file to bump the version). Pre-process Info.plist # My initial reaction was to extract the version into something like an xcconfig file and use plist pre-processing to inject it into the…
At work we’re having to wait an inordinate amount of time for Xcode to finish indexing our rather large Swift project. I’ve consequently spent a lot of time over the past few weeks digging into the internals of indexing. This is more or less a brain dump of what I’ve discovered thus far. File structure # Xcode’s index is broken into a number of files, located in {project derived data}/Index/{build…
I recently stumbled across Elixir and Phoenix . The more I dig in, the more I’m drinking the Kool-Aid and loving it. Coming from Rails, things feel familiar, but there has definitely been some grinding of gears as I’ve ramped up. One of the things I ran into today was how to make a “singular resource” for something like a user profile or account. My first instinct was to do something like this: #…
Last September I watched in horror as my MacBook Pro slowly died. It started with a text from my wife: “Hmmm,” I thought. “Maybe the System folder or something got corrupted. Should be a quick fix.” Little did I know that we had just lost every piece of data on that computer. Side note: I love that the only thing the MacBook is displaying is an icon equivalent of ¯_(ツ)_/¯. No helpful error…
I stayed up late the night of April 9, 2015 to pre-order the Apple Watch. I actually ordered two — work was paying for them, and we wanted to ensure there were enough devices for the team (we were busy putting the finishing touches on our watch app at the time). The device I kept was a 38mm Apple Watch Sport. The Good # Comfortable # I’m not huge into watches. I used to occasionally wear one for a…