Under The Bridge Under The Bridge

Category: Miscellanea
Follow The Script

Between writing our client apps in Swift and looking forward to writing our server apps in Swift, we tend to overlook that Swift can be used as a scripting language as well — seriously, is there anything it can’t do? — so here’s how you do that using Xcode:

A Beginner’s Guide to Scripting in Swift

First, you’ll need to start with a new Xcode OS X Command Line Tool Application … The cool part here is that you can even import frameworks like Foundation. Anything you can do with Foundation, you can put into a script — this includes File I/O, string manipulation, and more … Your script can even accept arguments. Just append whatever you want after your execution command to add your arguments like a regular script…

Scripting is a powerful asset and a useful tool in any programmer’s tool belt. For many iOS Devs, Swift or Objective-C are the only languages they know. If they know Swift, then there is no need to learn Python or another scripting language when writing simple scripts for any automation process.

End-to-end development and deployment with nothing but Swift? Shiny!

Another introduction here:

Scripting in Swift

A shell script is perhaps the most popular command-line scripting language, particularly in the mobile development world. To test the viability of scripting in Swift, we’ll write our markdown converter first as a shell script and then compose a Swift version. We’ll then do a quick comparison of the pros and cons of each script…

And one more example from @ayanonagon (and Swift Scripting talk here):

Swift Scripting By Example: Generating Acknowledgements For CocoaPods & Carthage Dependencies

We started using both CocoaPods and Carthage to manage our dependencies, and we wanted to add a nice little view in our app that shows a list of open-source acknowledgements and licenses. We have around 20 dependencies, and the thought of adding the acknowledgements manually sounded tedious…

Indeed it is. Well, that’s definitely our first experiment in integrating Swift scripts into our production process, then!

UPDATES:

Swift Scripting Redux: Localization

Running The Swift 3.0 Migrator On A Standalone Swift File

Command Line Swift

Scriptarian: “allows you to easily automate macOS using the Swift programming language, providing a modern alternative to AppleScript.”

Marathon “makes it easy to write, run and manage your Swift scripts.”

Scripting and Compiling Swift on the Command Line

How to Make a Web Crawler in Swift

Beak: “A command line interface for your Swift scripts”

Swift, plist, and Two Smoking Scripts

swift-sh: ”Easily script with third-party Swift dependencies” + NSHipster article

A RunLoop for your Swift script

Writing custom tools with Swift

Puma: “Build utilities in pure Swift”

Using Swift for scripting

Swift-For-Scripting: “A hand-curated collection of useful and informative Swift Scripting materials”

Command-line argument parsing using Swift Package Manager’s SPMUtility module

Third Time Swifty

So you’ve no doubt heard there’s a new Swift coming, and asked yourself

What’s new in Swift 3.0?

Swift 3.0 is changing pretty much everything, and your code will almost certainly refuse to build until you make the necessary changes. Seriously, if you thought the jump from Swift 1.2 to 2.0 was big, you ain’t seen nothing yet.

Didn’t we go through this already … why yes. Yes, we did.

In this article I’m going to explain some of the most important changes with as many code examples as I can, and hopefully this will give you some chance to be prepared to update your code when Swift 3.0 goes final. There are many more changes than the ones listed below, but the changes below are the ones that are most likely to hit you…

It’s like the Guaranteed Swift Programmer Employment Act! But don’t get too worked up, we completely agree with the conclusion of that article:

It’s easy to read these changes, some of which are tiny but introduce massive breakage, and imagine that Apple’s Swift engineers are just out to make our lives harder. However, the truth is that they are working hard to make sure Swift is as easy to learn, easy to use, and fast as possible, which are three very different priorities.

In particular, I have been struck by how committed the Apple team are to ensuring their changes are discussed and agreed in the open, as part of the Swift Evolution community effort. Every change above went through extensive community discussion before being agreed for Swift 3.0, which is an incredible thing to behold.

You can get involved and help shape these changes going forward: they are keen to hear ideas from a wide range of users, and it means the future of Swift really is in your hands.

So yes. If you’re writing or maintaining Swift code — and who isn’t? — we MOST strongly recommend you read this article thoroughly, and soon. Even better, get an early jump with How to install Swift 3 today and this sample project for instance. Although we’d figure that a Swift 3 running Xcode is pretty likely to show up first day of WWDC 2016, so no need to get too worked up there.

Speaking of the evolution of Swift, there’s also been a great deal of heartfelt concern voiced recently about a) ABI compatibility being missed in 3.0, and b) Swift never getting @objc on its cross-platform incarnations as the current plans lack, and what that lack of runtime dynamism means. (Spoiler: Horrible things.) Around here, we’re just fine with a) taking as long as it takes to get right, and with b) we’re pretty sanguine that something functional (geddit?) which fits the Tao of Swift will show up to address common use cases; but others find it a far more pressing concern. Great round up by Michael Tsai:

Dynamic Swift

Read that if you need to get involved in a good internet fight! Or even if you’re not, there’s still a lot of good conceptual discussion there, if you’ve got some time being familiar with the debate is worthwhile we’d say.

And speaking of being familiar with the debate, prepare yourself for Swift advocacy by checking out

Why big apps aren’t moving to Swift (Yet)

I strongly believe Swift is the future of iOS development. It’s only a matter of when, and the blocker is the breakneck speed it evolves. For smaller apps, Swift is good enough. For big apps, it’s at least a year away…

Let’s all see what we can do to push that forward!

UPDATES:

Wil Shipley smacks down the griefers in Pimp My Code, Book 2: Swift and Dynamism

How To Install New Swift Versions in Xcode

@ayanonagon’s Favorite Swift 3.0 Features

Ole Begemann’s Swift 3

littlebitesofcocoa.com #243: The Great Swift 3 Rename 🐤

What’s new in Swift 3.0

What’s New in Swift 3 – Part 1 and Part 2 and Part 3

Swift 3 and Declarative Programming

Official Swift Blog: Swift 3.0 Released!

Swift 3 Notes

Optional Non-Escaping Closures

Objective-C id as Swift Any

Updating Strings for Swift 3; Mastering Swift: essential details about strings  

Swift 3 Conversion Steps. Or “The 9 steps to Swift bliss”

Swift 3.0 Unsafe World

Writing Libraries for Swift 2.x and 3.0 Compatibility

Grand Central Dispatch (GCD) and Dispatch Queues in Swift 3

Yammer iOS App ported to Swift 3

Swift 3 and Comparing Optionals

A (mostly) comprehensive list of Swift 3.0 and 2.3 changes

Feeling Testy

Here’s an interesting talk on approaches to testing your apps:

An Artsy Testing Tour

Artsy has four iOS applications; all of them are open source, and all of them take different approaches to testing. Why? Because different testing techniques work better or worse in different circumstances…

Like the bit here on Core Data dependency injection,

You might give an object a Core Data managed object context instead of having it access a singleton. We use dependency injection for stubbed managed object context as well as for the network synchronization code. Energy uses in-memory Core Data managed object context that can be quickly and cheaply created, then destroyed for our unit tests. Part of what we can test is how an object modifies the Core Data stores, so we can create a managed object context, inject it into the object that we’re testing, and then the object does something, and then we can inspect the managed object context to see that the changes that had been performed on it are what we expect…

And you can check out all the discussed implementations yourself from this list:

Every element extremely enlightening!

Another one that came out this week is

Running UI Tests on iOS With Ludicrous Speed [EDIT: Translated to ConditionTester.swift]

They’re using a custom KIF fork, mind you, not the Xcode 7 UI Testing hotness. Well, we like it, anyway.

While we’re talking about dependencies and all, there’s been a lot of developments on that front since our last roundup when Swift and XCTest were both brand new. Wow, seems a long time already, doesn’t it? Here’s some articles and code worth checking out:

Swift: The Only Modern Language without Mocking Frameworks

Better Unit Testing with Swift

Four Types of Dependency Injection in Swift

iOS Unit Testing: Dependency Injection with Structs in Swift

Real World Mocking in Swift

Mocks in Swift via Protocols

Cuckoo “was created due to lack of a proper Swift mocking framework. We built the DSL to be very similar to Mockito, so anyone using it in Java/Android can immediately pick it up and use it.”

iOS Functional Testing With User Stories, Ui Test and Local Server

Testing with Swift – Approaches & Useful Libraries

Continuous iOS Code Coverage With Jenkins and Slather

UPDATES:

Mocking Dependencies with Generics “TL;DR: You can inject code dependencies in a transparent way by using generics and typealias.”

Creating a Custom XCTest Assertion Testing Dictionaries with Swift and XCTest Depedency Injection in Swift

Cleanse: “Lightweight Swift Dependency Injection Framework.”

Swifjection: “Dependency Injection library for Swift”

Kakapo: “Dynamically Mock server behaviors and responses in Swift.” + #254: Dynamically Mocking Network Requests with Kakapo

Making burritos with Swift (or How To Mock Classes You Don’t Control)

Mocks in Swift via Protocols

Running tests with Clang Address Sanitizer; Undocumented Xcode Sanitizer Settings

How to Do XCTestCase tearDown Wrong …and Right

Testing the User Interface with FBSnapshotTestCase

How to Make More Useful Swift Mock Objects

Bluepill – Open Source Tool For iOS Testing In Multiple Simulators With Added Reliability Features

Testing in Swift: Protocols & View Models

Testing and mocking without OCMock

Let Your Swift XCTest Methods Throw

XCTest and Optional Unwrapping

Xcode 8.3 new APIs: Waiting in XCTest

Controlling Siri and Asynchronous Testing With XCTest Deep Dive Into iOS Automation At Grab – Integration Testing Making Mock Objects More Useful

Mimus: “Swift Mocking Library”

Using protocol compositon for dependency injection

Introducing Protocol-Oriented BDD in Swift for iOS Apps: Part 1

Time traveling in Swift unit tests

Resetting iOS Simulator for UI tests

Why you should co-locate your Xcode tests

Keeping XCTest in sync on Linux

How to test a Swift package on Linux using DockerTesting Swift on Linux

XCTest closure based expectations

Tests that don’t crash

Avoiding force unwrapping in Swift unit tests

Using unit tests to identify & avoid memory leaks in Swift

Delay/Wait in a test case of Xcode UI testing

Network Stubbing Options for XCTest and XCUITest in Swift

Xcode unit tests with ⌘+S

Mocking in Swift

Unit testing asynchronous Swift code

Xcode’s Secret Performance Tests

Xcode UI Tests with Embassy and Succulent

The complete guide to Network Unit Testing in SwiftWormholy – iOS network debugging, like a wizard 

Behavior-Driven Testing Tutorial for iOS with Quick & Nimble

Stubbing XCUITests With Vapor Server Side Swift Framework

Throwing tests and LocalizedError

UI testing in a snap — iOSSnapshotTestCaseWhy I write Snapshot tests?

Watch out for protocol extensions in your Swift API (unit tests trap)

Customizing the source location of failures reported by XCTest

Visualizing Pointer Addresses as Emoji

Launch arguments in Swift

Xcode 9 UI Testing improvements

Unit Testing UIViewControllers

The iOS Testing Manifesto

Readable and maintainable UITests

Avoiding force unwrapping in Swift unit tests > Making Swift tests easier to debug

What’s in your Larder: iOS testing frameworks

Unit testing asynchronous Swift codeAsync/await in Swift unit tests

Bagel: “a little native network debugging tool for iOS”

Debugging iOS network traffic

PaintCode By Numbers

Been waiting patiently for that vector drawing in code PaintCode vs. Android report we promised last year? Well, that kinda wandered off into the weeds. Oops. However, PaintCode continues its relentless march towards ever greater heights of awesomeness in freeing you from PNG tyranny:

PaintCode 2.3 adds 15+ new features, including SVG export

  1. SVG code generation
  2. PDF, AI and EPS import
  3. Completely rebuilt image export
  4. Animated sequence export (“Great for Apple Watch animations!”)
  5. Copy & paste support from Sketch, Illustrator, Pages
  6. Live shape thumbnails in the Shapes & Groups browser
  7. New multithreaded renderer
  8. Support for cut, copy & paste of entire canvases
  9. Support for canvas multi-selection
  10. New way to find out where your library items are used
  11. New, easy way to replace one library item with another
  12. Replace Symbol with its content
  13. Improved PSD and SVG import
  14. Canvas Arrangement
  15. Built-in feedback form

So it’a a better time than ever to check that out. And besides their own excellent tutorials and documentation, there’s an ever growing oeuvre of tips and samples:

A First Project With PaintCode & The Story of Look Up’s Arrow

Create a Resolution Independent iOS8 App and Set Your Images Free

Using PaintCode to Dynamically Create Images in the iOS Football Manager Game Title Challenge

Working With PaintCode And Interface Builder In Xcode

Responsive iOS Buttons with PaintCode

Increasing The Tap Area Of UIButtons Made With PaintCode

Creating Beautiful iOS Controls with PaintCode

MMScalableVectorView: “Turns static PaintCode or Qwarkee code into a UIView that honors the contentMode property.”

FKRBlockDrawing “is a collection of two classes and one category to make creating artwork in code a lot easier. It’s great in conjunction with PaintCode, where the graphics in the examples project are from.”

Recreating MKUserLocationView is a great walkthrough of how to do a tricky control that highlights the benefits of PaintCode nicely.

UPDATES:

Recreating Apple Watch Activity Rings in PaintCode

Core Graphics, Part 1: In the Beginning and Part 2: Contextually Speaking and Part 3: Lines

PaintCode Tutorial for Designers: Getting Started and PaintCode Tutorial for Developers: Getting Started and PaintCode Tutorial for Developers: Custom Progress Bar

Preview PaintCode images directly in Interface Builder

PaintCode Review: Dynamic Graphics Made Easy

PaintCode Sketch Plugin Tutorial (and Sketch users, check out Sketch App Sources!)

CoreAnimation is pure love

Bring Your App To Life with CALayers: CALayers, Paintcode, and **Animations**

PaintCode: How to Make iOS-Ready App Graphics with Sketch App

PaintCode Power User: Text Fields

PaintCode Power User: Library Shadows

PixelCut and PaintCode

Join the Sprite Illuminati

Now this looks like a wicked awesome new sprite game making tool: Andreas Löw, already revered in sprite game maker circles for sprite sheet maker TexturePacker which has just continued getting more awesome since we reviewed 2.4 ages ago and for PhysicsEditor the premiere collision shape creator, has decided that the next thing that needs to be made easy is … dynamic lighting, with SpriteIlluminator!

Screen Shot 2015-01-27 at 9.01.52 PM.png

What is that exactly being edited there, you ask? Why, that’s a normal map. Not clear yet? Well, here’s a good writeup on the theory, but simply:

Screen Shot 2015-01-27 at 9.04.05 PM.png

These are supported in pretty much whatever major sprite framework you’re using, including SpriteKit’s SKLightNode as of iOS 8. So if you’re doing any 2D sprite work that would benefit FROM ADDING EXTRA AWESOME, we strongly suggest that you head right on over to the beta signup page while that’s still open!

UPDATES:

Adding 2D Lighting to Your Game

Normal map painting for 2d games

2d dynamic lighting tutorial for unity

SpriteKit dynamic light tutorial

Art For Non-Artists

Like to make a game, but held up somewhat by the practical issue of having absolutely no artistic ability whatsoever? Yep, we feel your pain. Quite thoroughly indeed. But here’s a series of videos to watch that might help you fake it enough to get by —

2D Game Art for Non-Artists

    1. Introduction
    2. Sky and Mountains
    3. Making Happy Little Trees
    4. Earth Blocks
    5. Awesome 2D Grass
    6. I Wanna Rock
    7. Creating our Buzz Saw

 

 

‘Course, those of us who are really non-artists need some more help than that. PixelProspector is an excellent resource for all things related to indie game development, and specifically for graphics they set out the options

    1. Create Graphics by Yourself
      1. Graphics Programs
      2. Tutorials (Drawing, Animation, Pixel Art)

 

  • Get Graphics from someone else

 

    1. Download Assets (Royalty Free Graphics)
    2. Hire Graphic Designer
    3. Big List of Fonts
    4. Big List of Icons

which does pretty well cover the options. Other interesting link collections for the artistically challenged:

Freebies For Designers – Icons, Vectors, Photoshop Brushes, Stock Images & Templates

Best Sites For Getting Free Vector Art Images – 35 Of Them

40+ Websites Providing Useful and Free 3D Models

Cool Text: Logo and Graphics Generator

Any particular goto resources for finding art as a substitute for any kind of talent that you rely on, Dear Readers?

UPDATES:

Complete Blender Game Art Tutorial. From zero experience to 2D or 3D game ready asset

300 Awesome Free Things covers various design/asset resources and also business/marketing/productivity services, tools, analyzers, …

Game Assets at ZEEF

A programmer’s guide to creating art for your game

TilemapKit’s collections from OpenGameArt.org:

From Programmer To Artist

Free Icons from Streamline Icons Pack

Healthy Kit

Looking for some Christmas presents for the other Apple fanbois/fangrrrls in your life? Here’s a rundown of various pieces of kit that are HealthKit-enabled, that’s a good way to combine geek fun with subtle lifestyle commentary:

How to make the most of Apple’s HealthKit in iOS 8 with compatible apps and accessories

..the free Health Mate app from WiThings can track your steps and log stats like weight using the iPhone’s M7 and M8 motion coprocessors. Where WiThings really shines is the integrated hardware accessories (sold separately) that can track unique data without user intervention..

If users are wanting to track nutrition and calories, the free MyFitness Pal app is a great choice. MyFitness Pal incorporates a large food database that can automatically fill nutrition information just by scanning a package’s barcode…

One of the most popular fitness tracking band lines on the market, Jawbone’s UP series boasts a number of tools to keep users healthy. The UP app was recently updated to integrate with HealthKit to track activity and add a sleep tracker capable of sending your data to the Health app. The software also provides personal coaching tips to achieve your personal fitness goals…

Another popular line of activity trackers come from Fitbit. Unfortunately, Fitbit has refused to natively incorporate HealthKit into its app. Instead, a third-party developer has created an unofficial app called Sync Solver for Fitbit that will read the data from your online Fitbit account and send it to HealthKit…

The Bowflex line of exercise equipment made by Nautilus has added HealthKit support for its app that will allow users to see workout stats in Apple’s Health app. Information such as workout duration, heart rate, calories burned and distance traveled are recorded…

Unlike many other fitness apps that track nutrition and activity, BACtrack integrates with a mobile breathalyzer that can measure your blood-alcohol content and send the stats to your iPhone…

With numerous accessories and one of the most mature platforms for fitness, the free Nike+ Running app can send your distance traveled, calories burned, run duration and more to HealthKit…

So there you go. We’ve been users of various pieces of the Withings kaboodle since the first scale shipped wow is it that long ago? and quite recommend them for keeping tabs on your various measurements. The other stuff mentioned above, well we’re sure it’s nice too, as always let us know any strong feelings you might have one way or the other!

And while we’re on the topic of HealthKit, the prolifically inquisitive Natasha The Robot has some intros here if you feel like programming your own healthy app:

HealthKit: Let’s Talk About Units

HealthKit: Asking For Identifying Information

HealthKit: Getting Fitness Data

Which is about all we’ve noticed in the way of tutorials — even the generally exhaustive Wenderlich iOS <N> By Tutorials didn’t have anything on HealthKit this time out. There’s a few testbeds and adapters on Github, but nothing jumping out as compelling. Hmmmm, wonder why that striking lack of interest from the development community in healthy apps. Hey, think how good the testing would be for you!

UPDATES:

HealthKit Tutorial with Swift: Getting Started

HealthKit Tutorial with Swift: Workouts

Researching ResearchKit

HealthKitHeartRateExporter: “A simple sample application for exporting heart rate samples from HealthKit.”

Stand Back and Deliver

Now here’s some awesomeness topped with awesome sauce and a side of awesome for reducing your blood pressure:

KrauseFx / deliver: Deploy screenshots, app metadata and app updates to the App Store using just one command.

What, seriously? Apparently so:

Features

  • Upload hundreds of screenshots with different languages from different devices
  • Upload a new ipa file to iTunes Connect without Xcode from any computer
  • Update app metadata
  • Easily implement a real Continuous Deployment process
  • Store the configuration in git to easily deploy from any computer, including your Continuous Integration server (e.g. Jenkins)
  • Get a PDF preview of the fetched metadata before uploading the app metadata and screenshots to Apple

Yeah, we’ve been in deployment-challenged places where we really, seriously, needed that tool…

h/t: iOS Dev Weekly!

UPDATES:

@KrauseFx seems to have the mission Make Everything Deployment-Related Work — also check out

KrauseFx / sigh: “Because you would rather spend your time building stuff than fighting provisioning.”

KrauseFx / snapshot: “Create hundreds of screenshots of your iPhone app… while doing something else.”

KrauseFx / frameit: “Want a device frame around your screenshot? Do it in an instant!”

KrauseFx / PEM: “Tired of manually creating and maintaining your push certification profiles?”

KrauseFx / produce: “Create new iOS apps on iTunes Connect and Dev Portal using the command line.”

… and all of the above are now connected into fastlane:

fastlane_text.png

fastlane lets you define and run your deployment pipelines for different environments. It helps you unify your apps release process and automate the whole process. fastlane connects all fastlane tools and third party tools, like CocoaPods and xctool.

So that makes … everything pretty easy, really!

homebrew-cask: “A CLI workflow for the administration of Mac applications distributed as binaries.”

quick-look-plugins: “List of useful Quick Look plugins for developers.”

itc-api-docs: “The unofficial documentation of the iTunes Connect JSON API.”

Convenient Build Settings

iOS Dev Tools: Deployment

fastlane 1.0

Little Bites of Cocoa fastlane Fridays:

fastlane Tutorial: Getting Started

Tutorial: Setting Up A CI Server With Xcode And The Open Source Fastlane Tools

Using Fastlane for Continuous Delivery of iOS Apps;

Adding Continuous Integration to a Swift project

Distribute Your App: “The beauty of fastlane is that you can easily switch beta providers with minimal configuration.”

One-click deployments for iOS Apps using Xcode 8, macOS Server, TestFlight and Fastlane

The greatest iOS development tools, including websites, desktop and mobile apps, and back-end services.

My Development Toolset 2017 for iOS

New FastLane Plugin to Upload iOS Binary With altool

Setting up Fastlane when you don’t really know what you are doing

fastlane-plugin-icon_versioning: “Overlay build information on top of your app icon.”

Standards Marked Downer

Here’s an interesting case study on how to not make friends:

Standard Flavored Markdown

It took a while, but I’m pleased to announce that Standard Markdown is now finally ready for public review.

standardmarkdown.com

It’s a spec, including embedded examples, and implementations in portable C and JavaScript. We strived mightily to stay true to the spirit of Markdown in writing it. The primary author, John MacFarlane, explains in the introduction to the spec…

Well, that all sounds well and good, aside from having a snicker at the obligatory xkcd 927 mention, doesn’t it? Um, no. After not too many yay! great! finally! comments on the above, we start getting

… We all use Markdown, not just you and your pals. It isn’t yours to do with as you please. Create something new, and respect prior art…

… Besides that, the hubris involved in calling your fork standard is a bit much…

… any such effort needs to do so under a new name. Not to do so is confusing to users and needlessly hostile toward John Gruber…

… Ignoring this term means you’ve broken the deal, and opens you up to a copyright infringement lawsuit…

Oops. The comments devolve from that last point into wrangling over the legal definition of ‘derivative’ … but if you’re down to arguing on that level, well, you’ve already lost, haven’t you?

Screen Shot 2014-09-05 at 2.59.35 PM.png

… yeah, that’s a pretty darn good example of exactly the kind of reaction you want your new project to avoid at all costs.

Now, we generally try to actively avoid pointless drama like this — what led us to this donnybrook was actually a handy looking new pod

laptobbe/TSMarkdownParser

TSMarkdownParser is a markdown to NSAttributedString parser for iOS implemented using NSRegularExpressions. It supports many of the standard tags layed out by John Gruber on his site Daring Fireball. It is also very extendable via Regular Expressions making it easy to add your own custom tags or a totally different parsing syntax if you like…

which looked like a particularly nicely lightweight way to manage some easy attribution of strings. ‘Course, there’s lots of other implementations around too, if that particular one isn’t adequate to your needs. Or you could always start your own flavour. “Definitive Markdown”? “Authoritative Markdown”? Those aren’t taken yet!

UPDATES:

And the first attempt was to try “Common Markdown” and that didn’t work either … so now it’s CommonMark!

Terminally Illin’

Now here’s a veritable novelette on a topic you almost certainly know less about than Craig Hockenberry does:

The Terminal

I’ve been using the Unix command line since 1983 and like most software developers, the Terminal app is a permanent fixture in my Dock. Over the years I’ve learned a lot of things that make working in this environment more productive, but even old dogs like me are constantly learning new tricks.

As much as I love them, these long “trick lists” on Stack Overflow have a problem: they’re poorly organized with little narrative describing why you’d want to use a technique. This long homage to the command line is my attempt to remedy that situation…

As developers, we live and die by our clipboard. Code and data moves between different contexts all day long thanks to Cocoa’s NSPasteboard. It should not be surprising that pbcopy and pbpaste are simple and powerful integration points at the command line…

Most apps have preferences that are managed by NSUserDefaults. You can easily view or modify these settings from the command line using the defaults command…

Speaking of designers, one of the best ways to communicate with them is through pictures. The screencapture tool let’s you do some things you can’t do using the Command-Shift-3 and Command-Shift-4 keys in the Finder…

Spotlight search on the Desktop has become an essential tool for developers. We find code, documentation, messages and all kinds of information that’s related to our projects using Command-space and a simple text field. Would it surprise you to know that you can do more complex searches of the same dataset using the command line?…

It’s incredibly handy to control your desktop apps using the shell. Since AppleScript has always been the best way to control apps, it makes sense that there would be a command line tool. The osascript tool is one the Swiss Army would love…

A lot of the files we deal with are executable. Even if symbols have been stripped from the app, you can still infer a lot of information by looking at the null terminated strings present in the data…

If you’re developing for Mac or iOS, you already know how damn useful Instruments is for tracking application behavior. DTrace is the framework that makes all that possible. Well, take a look at all the stuff in the shell that “uses DTrace”…

Have you ever had a folder full of files that you’ve wanted to access through a web browser? You could setup Apache to do this by editing the httpd.conf file, or just enter the following command in the folder you want to access…

Data is never in the format you need it, is it? The shell’s notion of standard input and output has always made it great for doing data conversion. Here are some tools that you may not know about…

Pretty much guarantee you’ll find a whole bunch of somethings you didn’t know in there!

UPDATES:

awesome-sox-command-line: “Use your OS X terminal shell to do awesome things.”

Hacking my shell prompt so I make fewer mistakes working with Xcode projects

You’re Missing Out on a Better Mac Terminal Experience

Supercharge Your Productivity With iTerm2 & zsh

Awesome macOS Command Line