Adding 3rd Party Libraries to a Swift Playground

Objective

Add a 3rd party library to a Swift playground

Swift playgrounds are great for quickly trying out new ideas, it can often be a lot easier to try out concepts within a playground than a whole application. Sooner or later you are going to want to add a 3rd party library to a playground, it is not immediately obvious how to accomplish this.

Read more

Implement your own onboarding flow using a UIScrollView

Objective

Implement your own application onboarding flow using a UIScrollView

 

Many popular applications, Google Translate, Pinterest, Fitbit, SwiftKey, to name but a few, have a series of screens to introduce the applications features/concepts to new users. Commonly, these screens consist of an image, small amount of text and a UIPageControl, allowing navigation between pages.

Read more

Inspecting Mobile App Traffic Using Charles Proxy

There are many reasons you may want to inspect mobile app traffic using Charles Proxy. You may want to change the responses which come from your server during testing. You may want to see how your favourite app works. In this tutorial I am going to show you how you can use Charles Proxy to inspect mobile traffic.

Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information).

Read more

Getting Started With Behaviour-Driven Development

I’ve written before on the subject of Behaviour-Driven Development, here and here. I have found it invaluable in answering the question “what should I test?” Focussing on behaviours rather than tests, helped me a great deal. A focus on validating behaviours soon becomes second nature and I found it a lot easier than Test-Driven Development.

Read more

Getting Started With BDD With Calabash and Specta (Part 2)

So back in Part 1 we set-up a simple Quiz App, we added Specta and Calabash to the project and most importantly we managed to code to of the steps from the first feature using an outside-in approach. In Part 2 we are going tocontinue where we left off and finish off the rest of the features. By the end of this post we will have a fully passing suite of automated acceptance tests. To finish off I will run through some of the pitfalls as the complexity of a project grows.

Read more

Getting Started With BDD With Calabash and Specta (Part 1)

So if you are anything like me, you may have noticed whenever you create a new Xcode project you get an associated Test folder with it’s own scheme. You may have even opened up a few of the test files and seen something like this.

Read more

How to solve the biggest problems with automating iOS builds

Automating iOS Builds in Jenkins should be easy. When you say it fast it sounds like it could be easy. 2 weeks of my life later, the automation of iOS builds has some complexities which I hadn’t expected. The main problem I had was with precompiled headers. It wasn’t long before I got the error “has been modified since the precompiled header”.

For simplicity I am going to write about how to overcome this problem in simple shell commands. For this post at least I am going to shy away from translating this into re-usable build scripts which can be called from Jenkins. The topic sounds like a good future blog post topic through so rest assured I will write about how to create a Jenkins build for iOS builds in the future.

Read more

How To Add Dependency Injection

Dependency Injection, why do you need it? You start your new app with good intentions. You strive to keep the code clean but quickly things go wrong. You hook your app to a set of services, add analytics, add some logging. Quickly you find there are dependencies all over your app. It is almost impossible to run automated tests against your app. Difficult to reproduce strange behaviour users are reporting out in the wild. It might be time for Dependency Injection.

Depend on abstractions. Do not depend on concrete classes

Read more