How to declare a block

Are you really sure on how to declare a block? How about all 4 variations? On iOS and macOS, it can be easy to forget Objective-C block syntax as it isn’t the most intuitive, especially now Swift is becoming the main language of new projects. Remembering the syntax is actually just a short click away but here are easy-to-read example uses with nullability tips and things to watch out for when declaring a block.
Continue reading

Eve of Apple’s World Wide Developer Conference 2015

WWDC 2015 has come round again and I’m lucky enough to be in San Francisco attending again! So what’s the tradition? Well I’ve just scoffed down a huge pile of pancakes down at Mel’s Dinner and just picked up my badge and legendary WWDC ’15’ jacket. You know the developers are in town as these jackets decorate the streets of San Francisco just like the huge colourful Apple banners that appear down 4th street.

There’s such a lively vibe going on as 5000 developer gather in one spot to learn the latest stuff happening at WWDC. In less than 24 hours we’ll all start queuing at 3am in the morning to get into the main Auditorium for Apple’s big keynote at 10am. Yes that’s a good 7 hours but the people you meet in the queue during this time can easily become life-long friends – anyone who’s met me at 2am in the morning, jet-lagged, freezing cold on a chilly San Francisco morning and still doesn’t want to throttle me by the end of it is deserves to be my friend!

The epicenter of change

The epicenter of change

This is easily the highlight of the developer year, iOS 9 is hugely expected as well as the next version of OS X with the associated XCode tools. For iOS 9 I’m hoping for big improvements to Siri and Apple Maps. Apple Watch should feature heavily in the sessions too but most of this is all under-wraps until the keynote tomorrow so this is all just speculation. In the mean-time, I’m hoping to head down to the mothership – Apple 1 Infinite loop before a few beers tonight with my fellow attendees at the ThirstyBear Brewery Co. If you’re in town see you there. Here’s hoping tomorrow’s announcement will be just as exciting as the build-up!

Bluetooth 4.0 LE – The Bluetooth Renaissance

Bluetooth 4.0 LE LogoSometimes a technology comes along that seems like such a good idea you wonder why it was never created in the beginning. For me, Bluetooth was one of those technologies. It’s been around since the late nineties and was incredibly powerful, especially for PDAs and phones but has always been overshadowed by the complimentary WiFi standard and surprisingly inflexible Bluetooth profiles which define the protocol, format and intended use of the data being communicated such as a Modem profile or headset profile.

It’s strength lies in allowing devices to talk to each other over a short distance with low energy and relatively easy setup but while many developers, makers and designers hoped to make use of it as a “wireless USB cable”, the reality was that most uses didn’t fit within the defined “profiles” and so developers opted for the Serial Profile – a generic profile that shuffles bits to virtual serial ports. Serial ports are decades old and because there is no context of what the data is inside the Serial port it’s very easy to bind the wrong program to the wrong device. For example, a data logging program trying to read the serial data from a serial port joystick would probably work or worse still would most likely silently do nothing. This adds confusion and frustration for the user. Compare this experience to using a USB device – you plug it in and open up the program and it recognises the device and starts using it. You don’t see incompatible devices, you can’t connect it to the wrong thing, it just works which is probably why USB is so popular.
Continue reading