June 21, 2018 | Swift, Unit Testing, Scripting, iOS, macOS, tvOS, watchOS
With the release of Xcode 9.3, Apple included a new command line tool called "xccov". It can be used to view code coverage reports as JSON, which can then be used to automate code coverage workflows. In this tutorial we'll see how to generate and view code coverage reports. We'll then write a Swift script to process the report.
June 16, 2018 | Swift, Beginner
In Part 2 you learned how to declare constants and variables. When we declared `let pi = 3.14159` or `let email = "test@example.com"`, we didn't seem to care too much that one is a number (pi) and the other is text (an email address). However, you probably noticed that pi was declared without quotes while the email address was . . .
You've set up Xcode and wrote your first program, but you probably don't yet understand how the code you wrote works. That's OK, we'll get there! In this tutorial we'll learn about two of the basic building blocks of computer programs, constants and variables.
You've decided you want to learn programming. Maybe you have an idea for an app, maybe you're looking to change careers, or maybe you just think it's something you would enjoy doing. Whatever the reason, welcome!
April 24, 2018 | Swift, Generics, Architecture, iOS, macOS, tvOS, watchOS
In this tutorial, we'll look at a case study of using conditional conformance in unit tests. The problem we'll be solving is a common one. You have a set of stubbed JSON responses and you want to test that they are serialized correctly into Swift model types. Some responses return a single model resource while others return a collection.