Library

The Descent to Madness (or Cocoa)

I’ve been developing for iOS for a little over 3 years now. I’ve had a few forays into less mobile platforms here and there, with even one very simple OSX app that I wrote a year in that stayed internal to the company (and only crashed some of the time). So when I learned that myself and two other iOS developers would be working on an OSX app for a client, I thought, “I got this; I know iOS, I’m halfway there” and I wasn’t really worried about it. I prepared myself for the project by deep diving into Swift, which was also new to me and by reading Migrating from Cocoa Touch. There are a million blog posts about this (ok, maybe 5) and just as many tutorials on how to make an OSX app in 5 easy steps. And then we started actual development, with designs and requirements in hand, I suddenly realized that Cocoa is actually Cocoa Touch Bizarro Land. Everything looks the same and is named the same, but doesn’t really act the same a great deal of the time. In fact, the distinction between Cocoa and Cocoa Touch is hardly that; Cocoa Touch means Cocoa Touch, Cocoa means Cocoa Touch. Henceforth, for the duration of this blogpost, Cocoa means Cocoa for OSX and Cocoa Touch means Cocoa Touch for iOS. And with that out of the way, let’s talk a little about my struggles in the shadowy wasteland that is Cocoa development.

Not many believe in Microsoft anymore, and some have zero confidence in what it will bring to the table, especially in the mobile space. However, I believe Windows 10 mobile could be the beginning of a new era for Microsoft. I know what you are thinking – Microsoft is way behind their game. I don’t blame you- I was in the same boat until the new OS was announced. Microsoft is on its way to release its full version of Windows 10 at the end of July and, with it, the hope that it will save Windows Phones from hitting rock bottom. Microsoft is creating a positive vibe among consumers and developers with great ideas like One Application Platform, allowing porting of Android and iOS apps to the Windows ecosystem, and other great improvements of core features like Cortana and the new Internet Explorer (Project Spartan), among others.

Microsoft in the mobile space

We all know Microsoft has struggled immensely since the appearance of the iOS and Android operating systems. Therefore, a lot of consumers and developers have left the Windows environment and switched to its competitors. When someone asks, “What about the Windows Phone?,” usually the response is “Who cares about Windows”.

On the consumer side, as well as the enterprise, Microsoft is near the bottom in terms of market share. Figure 1 shows the percentage of registered Mobile Operating Systems as of 2014. Android has a dominance of roughly 52% market share, followed by iOS at 39% and Windows at 2.5%.

If you’re a “beast mode” developer you’re probably here because you said to yourself. “I want to build a real time communication app without proprietary technologies”. Now if you’re a novice developer you probably said “I want a chat app, and I want it now”. In any case you are in the right place. I’m going to show you how to build FaceTime in an hour….Ok not really, but I will show a quick and easy way to get a video chat application going. So lets start this thing off right! With the all important question that starts every blog. “What is ___”?

What is WebRTC?

WebRTC is the same as many other technologies looking to solve the problem of how to do real time communication in the browser. For example, under the hood WebRTC is doing the same things that Adobe did with RTMFP. The main difference is WebRTC is not proprietary, and doesn’t require a plugin.

The three APIs that really make WebRTC tick are:

GetUserMedia (camera and microphone access)

PeerConnection (sending and receiving media)

DataChannels (sending non-media directly between clients)

Does this stuff work for native mobile applications?

So were you like me a few years ago when that shiny new toy called WebRTC came to be? You got really excited, while shedding tears of joy, but then you searched for…”WebRTC on mobile”. Yeah my heart dropped too. Nothing. Today things are different. There are now core libraries that Google uses for Chrome that allows for different build targets including Objective-C and Java. What’s really awesome is there are now build scripts out there that make compiling for these targets easier.

Internet-connected smart things are great, but what if you can’t get them connected to the information superhighway? Let’s explore some of the methods and interactions that put the “I” in IoT.

The Purchase.
You’ve watched crowdfunding videos, scoured the blogosphere for reviews, watched countless unboxing videos, screamed “shut up and take my money” into a computer and finally received this smart thing for your abode. Your palms begin to sweat as you meticulously reenact your favorite unboxing video.

The Nest Thermostat comes with a fancy little screwdriver.

The Setup.
Don’t botch this; you’re doing good. With toolbelt on, you crawl under the house / tiptoe through the attic / climb a ladder and get the device installed. (Bonus points if the tools came in the box. Nest, I’m looking at you.) It’s wired to a wind-tunnel-tested wall wart and ready to talk to the mothership. You button up the install and hop off the ladder. Read More