Software Dev

Getting Started with Instruments

Has there ever been a more powerful, but under-utilised tool than Instruments?

Instruments is a tool included with Xcode that helps you analyze, profile, and debug your live iOS app. Solve memory leaks. Visualize memory. Monitor disk, network, memory, and battery usage. You can even find zombies. ๐ŸงŸโ€โ™‚๏ธ

It lets you do incredible things but is also overwhelming to new developers, in which case this Ray Wenderlich tutorial can come in pretty handy.

๐Ÿ‘‰ Getting Started with Instruments

There’s also an Apple WWDC presentation with this same name. ๐Ÿ˜†

Visual Memory Debugger

Via iOS Dev Weekly.

Software Dev

Motion ๐Ÿ’“

This ๏ฃฟ-centric open-source animation library looks promising.

๐Ÿ‘‰ Motion on GitHub

Motion

Motion is an animation engine for gesturally-driven user interfaces, animations, and interactions on iOS, macOS, and tvOS.

I’ve been a little skeptical of open-source animation platforms since I had to toss out one app and then another as cocos2d morphed into cocosd2x and broke everything. Damn that x! But still, this looks cool. ๐Ÿ‘†

Via iOS Dev Weekly.

Software Dev

The Mac Developer’s Swiss Army Knife

I get so annoyed when I find myself using random websites ๐Ÿคฎ or all different apps ๐Ÿคท๐Ÿปโ€โ™‚๏ธ to do things like format JSON, test regex’s, encode/decode Base64, encode/decode URLs, or convert Unix time strings.

This nifty little Mac app does all the basic things any developer regularly needs natively, locally, and offline. And it’s free if you build it yourself. Or pay for the official build. Up to you.

๐Ÿ‘‰ DevUtils.app – Developer Utilities for macOS

DevUtils.app screenshot

Via iOS Dev Weekly. See also: Mac-assed Mac Appsย ๐Ÿ˜†

Software Dev

It’s Time for Snapshot Testing

I love the idea of snapshot testing. It’s a simple way to automatically test an app’s UI.

It works like this:

  1. Set the app up in a certain state and take a screenshot. Save the screenshot. ๐Ÿ“ธ
  2. Next time when you run the same test, you compare screenshots. ๐Ÿ“ท ๐Ÿ“ธ
  3. If something changed unexpectedly, then you know there’s trouble. ๐Ÿ’ฅ

Here’s a nice series about how to do it for iOS/ Xcode.

๐Ÿ‘‰ Snapshot Testing. Testing the UI and Beyond (Part 1)

And GitHub: swift-snapshot-testing

The coolest thing is that you actually upload your screenshots in any new pull requests, so you can literally see what the change is all about (“The perfect pull request”). ๐Ÿคฏ

Image for post

Via iOS Dev Weekly.

Software Dev

New Wisdom On Configuring Xcode Projects for Different Environments

It seems like it would be simple and/or obvious how to configure your app to point to different environments (dev, QA, prod, etc.). But alas, it is neither simple nor obvious.

Here is some easy, practical wisdom that breaks down five different ways to configure different environments in an Xcode project. Spoiler: it finally lands on Script Phases. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

๐Ÿ‘‰ How to configure Xcode projects for different environments

First of all, โ—๏ธย do not use targets for environmental configuration purposes

Via iOS Dev Weekly.

Software Dev

The Elm Architecture

I’ve been trying to understand the Elm Architecture for a new iOS project. I kept reading over this article and thinking, “Wait a minute…. What’s the catch here? This seems too simple.” ๐Ÿง

๐Ÿ‘‰ The Elm Architecture: Simple, yet powerful โ€“ An overview by example

I like that this architecture can be explained in a very short post with examples.

The beauty of The Elm Architecture lies in its simplicity.

That article is simple but assumes a web UI and explicit mentions HTML ๐Ÿ™„. Here is a funnier and more useful article about Elm for iOS. ๐Ÿ˜‚

๐Ÿ‘‰ Elm architecture in iOS: Why you donโ€™t need shit like RxSwift or MVVM

Elm architecture can be described as follows

msg -> Model -> View -> msg

I even made my own diagram just to make sure I “got” it. The devil is in the details, but I think this is right. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ It definitely seems simpler than VIPER.

Software Dev

From Nothing to App Store in an Hour

Building, validating, and uploading your iOS app to Apple’s App Store Connect is a surprisingly arduous process. The next time I make an app on my own, I’m totally going to automate the heck out of the process where I can.

This video show how to do it in an hour. ๐Ÿคฏ

The lead maintainer of fastlane demonstrates how easy it is to set up fastlane to automate the process of building, signing and uploading your app to the App Store

Via iOS Dev Weekly.