• Dumping the Swift AST for an iOS Project, Part 2

    Swift logo
    New and improved! Now even Swiftier!

    In my last post, I expressed some reservations about the method I was using to generate the correct compiler target for the AST command. Well, I appealed to a higher power (the swift-users mailing list) and got back this incredibly helpful response from Jordan Rose:

    Read more...


  • Dumping the Swift AST for an iOS Project

    Photo of a forest
    These would be non-abstract trees.

    UPDATE: A new and improved version can be found here.

    Read more...


  • Introducing Restless

    Dirty work boots
    I did all the dirty work for you.

    For a while now, in my “spare time”, I’ve been working on a new library for iOS. And I’m pleased to announce that it is now ready for public consumption.

    Read more...


  • One-liner to Create an Immutable Copy of an Array of NSMutableArrays

    We all love fancy data structures, but sometimes all you need is a nice NSMutableArray. Recently I was using an NSMutableArray filled with NSMutableArrays. Occasionally I needed to share this data with other classes, but I didn’t want to give them my mutable version, since they could change it out from under me. Really I just wanted to give them an immutable snapshot. But how to do this elegantly?

    Read more...


  • Dynamic Dependencies in Objective-C

    Or: You Could Be Forgiven For Assuming That This Is A Singleton

    Screenshot of initializer code
    Smokey, my friend, if you don't use dependency injection, you are entering a world of pain.

    I was recently asked to debug a very mysterious crash in a customer’s code. It was a nasty bug – hard to reproduce, and with a very confusing stack trace.

    Read more...


  • The Proper Way to Create a Singleton in Objective-C

    Design Patterns book, open to section about singletons
    Make sure you're using it right.

    There are many ways to create a singleton in Objective-C. Most of them are wrong. Read on for a rundown of your options.

    Read more...


  • Non-Obvious Things You Should Know When Starting Your First Apple Watch App

    Watchkit SDK icon
    Appropriately shown with three layers.

    So you want to write a Watch app? When I was writing one a couple months ago, I discovered that there are some high-level gotchas that can trip you up. Mostly what it comes down to is, if you don’t understand the paradigm that Apple expects you to work within, you’re gonna have a bad time.

    Read more...


  • Cocoa Naming Conventions

    Cup of hot cocoa
    Delicious, delicious Cocoa.

    Did you know that Cocoa has documented naming conventions?

    Read more...


  • A Developer's Experience Running a Design Contest on 99designs

    Elegant workspace
    Obviously the desk of a master designer. Possibly Jony Ive.

    How important is it for a freelancer to have a website these days? I’m not sure how much utility it provides, but having something out there still seems to be a social norm. So I’ve been meaning to get my site off the ground for a while now (nearly two and a half years, to be honest). I finally convinced myself to get it done “soon”, and set about trying to throw together a simple page that would at least convince potential clients that I am an actual business.

    Read more...


  • Apple Watch: Fashionable? Maybe. Useful? Maybe Not.

    Apple Watch
    What would you say you do here?

    Like many Apple admirers, I watched yesterday’s Spring Forward event with excitement. And like many, I was left waiting for something more when it came to the Apple Watch.

    Read more...


  • Using Twitter As Curated Comments

    It’s rare when the sprawling blob of humanity that we call the internet agrees on anything. But we seem to be slowly reaching consensus on one thing: comments are awful.

    Read more...


subscribe via RSS