Natasha The Robot

Currently learning... Swift!

You can follow me on Twitter here.

Subscribe via RSS here.

Subscribe to my Swift newsletter

WatchKit: The Text Input and Dictation API is Available!

I've looked into it some more, and voila, the text input API is in fact available for everyone to use. Of course it is not fully useable yet in the current simulator, but there is an API for it. I created a simple Interface Controller with a button that will bring up the text input controller using this code...

WatchKit Data Sharing: Beware of the NSFileCoordinator and NSFilePresenter

One of the biggest challenges of working with WatchKit is figuring out how to best share information between your iOS and WatchKit app. While NSFileCoordinator and NSFilePresenter sounded perfect for the task, I learned that there are big issues with using these APIs...

Mutating Functions in Swift Structs

I’ve started working a lot more with Swift Structs, especially as I’m learning more about functional programming. I remember when Swift first came out, I was super confused about why the compiler made me insert the “mutating” keyword for my functions in structs. However, now after reading a bunch about value vs reference types, it’s starting to make a lot of sense.

Unit Testing in Swift: A Quick Look at Quick

A few days ago, I wrote about how to do dependency injection in Swift using the default XCTest framework. However, I’ve actually been working a lot with Quick to do my unit testing in Swift. So today, I want to walk through how to write some ViewController tests with Quick...

Functional Swift: Tail Recursion Explained

As I’ve been learning functional programming to become better at Swift, one concept that consistently comes up (at least in Haskell, which is what I’ve been focusing on), is tail recursion. It sounds scary at first, but it makes a lot of sense for iterating over finite lists.

Unit Testing in Swift: Dependency Injection

One of the harder topics for me to understand in testing is definitely dependency injection. However, after writing a bunch of tests last year, I think I finally have a handle on it, and would like to share what I learned.

Unit Testing Optionals In Swift: The XCTAssertNotNil Catch

Recently I pointed out a better way to test optionals using XCTAssertNotNil. So as I’ve been writing a lot more tests recently, I decided to try this way out. But I soon ran into a problem...

5 Can’t-Miss Lessons from the Functional Swift Conference

In the beginning of December, I attended (and spoke at) the Functional Swift Conference in New York. It was honestly one of the best conferences I’ve been to in a while, and also the hardest one I’ve had to speak at! I went back home more excited about Swift and my work than ever.

How To Unit Test With Optionals In Swift

This morning I woke up to find a very exciting tweet from @almassapargali...

Holiday Reading: Functional Programming

The more I Swift code I write, the more I'm realizing I need to understand Functional Programming a lot better. So this holiday season, I'll be reading a few books on the subject, and figuring out how to apply functional principles to my Swift and iOS code.