Marramgrass

iOS Simulator Keyboards on Buddybuild

At work we use Buddybuild for continuous integration, running our tests and shipping builds to iTunes Connect for TestFlight. On the whole we've had pretty good experiences with their service. (The only CI service I've used that I like more is Codeship. I love Codeship, but iOS isn't part of their setup. We use their service for all our server code.)

I was recently doing the annual new-Xcode-new-Swift dance, and found that some of our UI tests were failing. These ones were the tests that interact with the iOS on-screen keyboard, and they were failing in a way consistent with the simulator acting as having a hardware keyboard attached—that is, the software keyboard wasn't visible when the tests expected it to be.

After a bit of a chat with Buddybuild support and a bit of digging around with Google, I've added the following to our post-clone build script (buddybuild_postclone.sh):

# make sure the simulator doesn't have a hardware keyboard connected
xcrun simctl shutdown all
defaults write com.apple.iphonesimulator ConnectHardwareKeyboard 0

The first command closes any running simulators in the environment, to make sure that they'll start up again and so let the second command take effect, which writes a defaults key and value to tell the simulator to not use the hardware keyboard.

And now all our UI tests are passing reliably again. Simple, once you know the options are there.

Stranger Things 2

I watched the last episode of Stranger Things 2 last night. It made for what I found to be a very satisfying conclusion to the series. Some thoughts on the whole thing follow, but they probably count as spoilery. If you care about such things and haven't watched it yet, then stop reading now.

I'm already looking forward to more in the future.

Grace

Eamonn Mallie addresses the ever-bubbling stew of Northern Irish politics:

What, I thought, if the events of the day had been otherwise and Arlene Foster mindful of all our human physical frailties had acted graciously in the circumstances?

Northern Ireland would potentially be a different place not just now but possibly for ever.

One single act of grace, of leadership, at the hands of Arlene Foster would probably have melted the possibility of what she now expects to be a ‘brutal election.’

When will principle of ‘Noblesse Oblige’ hit the Hill?

(Responsibilities of the rich, famous and powerful, notably to provide good examples of behaviour or to exceed minimal standards of decency. It has also been used to describe a person taking the blame for something in order to solve an issue or save someone else)

Mallie expounds on grace as the choice not to fight, but to embrace. It’s the choice to step back from the brink of yet more Them’n’Us ugliness.

It’s a powerful piece of writing, the more so for being true—and even more for the hint of sorrow at imagining what could be but is not.

I Wrote A Book

Co-wrote, that is.

A good friend and colleague has written a couple of books over the last number of years, and I had the enjoyable experience of doing the technical review on them. When his publisher asked if he wanted to write a book on developing apps for Apple Watch, Mo said he would—but he'd rather work with a co-author. When he asked if I would like to take it on, I took almost no time to think about it before I answered with a resounding, "Yes!"

The book is Build watchOS Apps: Develop and Design from Peachpit Press, and is available now as an ebook and in print.

We spent a large chunk of last year on this, with a bit of a hiatus around Apple's Worldwide Developer Conference while we anticipated and then digested the announcement of watchOS 2, and we're really quite pleased with the result. The book covers everything an iOS developer with a little bit of experience needs to get going with the watch and make the most of what it offers.

Perhaps like many programmers, I have a long list of half-finished side projects behind me, but—with the support and encouragement of my family, Mo, the team at Peachpit, and our employer—this is one that has shipped and shipped well. That feels good.

If you think it's something that might interest you, there's a sample chapter on the publisher's website. And if you like what you see then of course I'd be ridiculously grateful if you were to buy a copy ;)

Reading Highlights 2015

I've never done the end of year lists thing here, but there are a few books I've read in 2015 that I'd like to recommend. As has happened with my reading over the last few years, they're mostly genre. That shouldn't put you off. If you like some of the same sort of things as me, you should give these a go.

Somebody on Twitter recommended the Expanse books from James SA Corey a while ago, and a series based on the first one has just started on Syfy. These have grabbed me and dragged me along without stopping. If you liked Firefly, you'll enjoy these.

I'd heard a lot of good about Elizabeth Bear, and I wasn't disappointed by her Eternal Sky trilogy. Their world is intricate and beautiful. With horses.

Witches of Lychford by Paul Cornell is quick little novella mixing predatory business practices with demonic influences in rural England. It's probably my favourite thing I read all year.

I've had good luck with recommendation emails from Amazon, too. The first one that stuck was Linesman by the writing partnership of SK Dunstall. Interesting politics and an intriguing setting (including a space-travel mechanic that's totally different to anything else I've come across) more than make up for occasionally flat characters.

The other good Amazon rec I received was for the The Fold by Peter Clines, which took me to its preceding volume, 14. Creepy mystery and monsters, Tesla, Lovecraft, bright green cockroaches and a big daft grin on my face. Just the grin, that is. The cockroaches are in the book, not on my face.

Other things I enjoyed this year were the much-celebrated Station Eleven, the pulpy but fun Origin, and the Shadow Police books and the PC Peter Grant novels—both of which satisfy my love of modern wizards doing normal(-ish) police work.