Introducing ReSwift

For the last two months I have been actively working on Swift Flow with the goal of bringing the ideas of the Flux and Redux libraries to Swift developers.

Read More...

Swift Error Handling and Objective-C Interop in Depth

For the impatient reader:

TL;DR

  • The ErrorType protocol has hidden requirements that are automatically fullfilled if you use an enum to implement the protocol
  • Objective-C methods can only be translated to Swift’s error handling mechanism if they return Objective-C objects or boolean values
  • Swift will invoke the catch block if the Objective-C method returns nil/false, independent of whether an NSError was produced or not
  • If an Objective-C method produces an NSError and returns a value the catch blocks is not invoked and the error cannot be retrieved
  • GitHub project with examples
Read More...

Switching iOS devices and the Keychain

Unfortunately some of my MovieLoggr users ran into the following issue: After switching to a new phone and restoring it from a Backup MovieLoggr would behave unexpectetly (and in some cases crash) because the App could no longer access the user’s password and unfortunately did not handle this gracefully.

Read More...

Using SSH for private and work account on a Mac

Disclaimer: I’m not a huge fan of configuring software; I’m primarily writing this to remember it for the future.

Using SSH instead of HTTPS to authenticate against services such as GitHub, Bitbucket or Heroku is very convenient, instead of typing a password for every interaction Mac OS simply exchanges SSH keys behind the scene. However, one can run into trouble when trying to use multiple accounts of the same service with SSH authentication.

Read More...