Adventures in iOS Development
Unit Testing and Clean Code Exploration Toolbox Archive About Feed

iOS Development Toolbox

Some things I find useful during everyday work: it may be API design guideline, debugging tool, command-line utility or some cool Xcode plugin.

Code

Swift

Style/syntax

Where Swift is going and how it relates to existing Objective-C codebases.

API Design Guidelines

Better Translation of Objective-C APIs Into Swift

Example of applying guidelines to existing code: Apply API Guidelines to the Standard Library

Writing Documentation

Write a documentation comment for every declaration. Insights gained by writing documentation can have a profound impact on your design, so don’t put it off.

If you are having trouble describing your API’s functionality in simple terms, you may have designed the wrong API. bloc

Swift Documentation - NSHipster article covering most useful documentation markup parts for day to day work.

Thorough Markup Formatting Reference from Apple

Other

Profiling your Swift compilation times

Libraries

Creating your first iOS Framework

Checking out libraries:

  • cocoapods-try - “quickly try the demo project of a Pod” - pod try POD_NAME.

  • ThisCouldBeUsButYouPlaying - amazing combo of amazing things: Swift playgrounds and open source. Specify libraries you want to play around and get playground with them. Supports both CocoaPods pod playgrounds RxSwift,RxCocoa and Carthage carthage-play Alamofire/Alamofire.

RxSwift

RxSwift - lots of documentation and playground

Functional Reactive Intuition - Swift edition (blog) - nice example of using a bunch of different operators, mixing and matching different inputs: timers, gesture recognizers and stuff.

Functional Reactive Programming with RxSwift (video) - another great practical example, this one: chaining async calls.

RxMarbles - Interactive diagrams of Rx Observables

Other

Mapping JSON:

Then - “✨ Super sweet syntactic sugar for Swift initializers.” True! ✨

Cartography - “A declarative Auto Layout DSL for Swift” - combines best of both worlds: succint, easy to follow syntax and type safety. Goodbye, VFL!

OAStackView - UIStackView goodness ported back to iOS 7/8.

Dependency Management

Carthage:

CocoaPods

Swift Package Manager (waiting to use it until Swift 3.0 arrives)

Misc.

URL Schemes for Settings

Tools

IDE

AppCode

IDE with amazing Objective-C support: many refactorings, fixing _old and syntax with hitting ⌥-Enter, “Show Usages”, “Show History for Selection.” Unfortunately at this time only so-so Swift support.

Tips:

Use ⌥-Space (View Quick Definition), to quickly review definition or content of the symbol at caret, without the need to open it in a new editor tab.

Workshop - learn your way around the AppCode, pick up some shortcuts along the way.

List of nice things about AppCode.

Xcode

Making Xcode behave - streamline Xcode’s pane management with Behaviors.

Xcode Plugins

Alcatraz - plugins package manager.

Refactorator - rename refactoring in Swift! Setting keyboard shortcut:

Quick Jump - Jumping to any character/word/line you see on screen in an instant. To appreciate it’s coolness check out this video of original ace-jump for Emacs.

BlockJump

This plug-in lets you jump between methods, or other items in the source editor.

^ + [ : jump up
^ + ] : jump down

Other

IconOverlaying - “Build informations on top of your app icon.”

OS X

Hyper Key - using it to simplify some of the shortcuts (e.g. re-run last unit tests in Xcode) and switch between the apps (e.g. hyper + X - opens Xcode, hyper + S - opens Safari).

Quick Look for Markdown files

Provisioning - “A Quick Look plug-in for .mobileprovision files”

Preview strings - QuickLook plugin to preview .strings files

Terminal

autojump - “A cd command that learns - easily navigate directories from the command line”. Using this I can jump quickly to any folder I’ve visited. Let’s say I want to open folder with open source projects: running j opens takes me to ~/Developer/open_source - neat!

tree - “recursive directory listing command that produces a depth indented listing of files”. On OS X can be installed with brew: brew install tree.

selecta - “A fuzzy text selector for files and anything else you need to select. Use it from vim, from the command line, or anywhere you can run a shell command.”

I’ve created alias that combines tree and selecta to open any file from current directory and its subdirectories: alias tsof='open "$(tree -if | selecta)"'.

joe - just run joe swift and you get yourself a nice gitignore. Basically a command-line wrapper for github/gitignore repo with a few extra features.


Charles

Proxy for monitoring network traffic. Since Apple is pushing privacy http://www.apple.com/customer-letter/ (App Transport Security) and Let’s Encrypt makes it easy “to obtain a trusted certificate at zero cost.”, encrypted traffic will be more and more prevalent, How to inspect SSL traffic with Charles comes in handy.

Reveal

Apple is trying to catch up with the original visual debugger, but so far Reveal experience is much smoother, allows multiple snapshots and has live editing.

xScope

Dimensions tool alone is amazing, especially when all designer shares with you is a flat png, see video.

Hopper

Great for peeking under the hood of SDK: introduction.

Hopper is a reverse engineering tool for OS X and Linux, that lets you disassemble, and decompile your 32/64bits Intel Mac, Linux, Windows and iOS executables!

Even if Hopper can disassemble any kind of Intel executable, it does not forget its main platform. Hopper is specialized in retrieving Objective-C information in the files you analyze, like selectors, strings and messages sent.

Macdown

Markdown editor. Previously used Brackets + extension for this, Macdown works much better.

Simulate non-perfect networking conditions and see how app handles it. No need to go to the elevator/basement to get bad signal! Detailed article from NSHipster.

Designing for Real-World Networks.

GitUp

Great GUI git client.