Getting Started with Swift, For NON-Apple Devs

This past weekend I attempted to get started with Swift coding. Since I have not been an Apple Developer for a while, it wasn’t immediately obvious how to get started. But once I fumbled around a few minutes I realized I needed a developer account to get the latest XCode. Jeez, it really shows how much Apple loves to lock you in hard core to their development ecosystem. An unfortunate trait of a company that is actually extremely closed in much of its behavior, while taking advantage of so much of the open source community. But I digress, this isn’t a rant about the unethical behavior of Apple. I’ll reserve that for the novels worth of material it deserves.

One I signed up for the developer program, which costs $99 bucks, I immediately made my first huge mistake. This damnable mistake blew the entire weekend of hacking. I added under “Company” my simple DBA (Doing Business As) name. I already had an account, and because of this change for making this existing account become a developer account from a personal base level account, sprung a red flag. I checked back frequently over the weekend, but it wasn’t until Monday that somebody checked the app, realized the Company name I added was merely a DBA and ok’d my account. So far, 38 hours down the drain for getting started hacking on Swift! Dammit.

However, this morning I was happy to find everything was ok’d, and thus, the remaining bit of this blog entry is a bit more example and a little less story of my day.

Developer @ Apple
Developer @ Apple

Getting XCode 6 beta

I wanted to do Swift hacking, the first step was to download XCode 6 beta. That’s available via download on the iOS Developer page (and I suppose the Mac Developer page). Scroll down on that page until you find the XCode Download button.

The Warnings and the Download XCode 6 beta page.
The Warnings and the Download XCode 6 beta page.

Also note, if you’re looking to do Swift hacking like I’m doing here, I’d actually advise against getting the iOS 8 beta or OS-X Yosemite Developer Previews right now. Best to keep as stable a machine while toying around with a new language. At least, that’s what the conversations have been so far…

OS-X Yosemite & iOS 8
OS-X Yosemite & iOS 8

Once I got Xcode 6 beta installed I dove right into creating a Swift Project. I created a simple new project that is empty to just check out what Xcode 6 provides out of box for the Swift Project.

Selecting an empty Xcode 6 beta project to use with Swift.
Selecting an empty Xcode 6 beta project to use with Swift.

The next dialog is where the Swift magic is selected.

Selecting Swift, entering a project name and other information dialog.
Selecting Swift, entering a project name and other information dialog.

After that I just clicked through on defaults until I got into the Xcode IDE with the project open.

Selecting the appropriate simulator.
Selecting the appropriate simulator.

Next I executed the project. Since I’d had my phone attached it wanted to run it there, but I have 7.1 iOS on it which won’t execute Swift code. I had to select the appropriate simulator then to run the application project. Once that ran, since I’d not done so on this particular computer, I needed to enable developer mode.

Enabling developer mode.
Enabling developer mode.

I did so and the empty application launched.

An empty iOS 8 iPad Retina Application.
An empty iOS 8 iPad Retina Application.

So that’s the basic getting started, no code actually slung. But rest assured I’ll have another post soon detailing some first code snippets. I also hope to get some comparisons written up between XCode with Swift and Xamarin Studio and C#. It’s cool that Apple finally has a modern feature rich language, so it’ll be interesting to see how each stacks up from a language and IDE perspective.

References:

Apple iOS / OS-X vs. Windows 8 / RT == OS Goulash & Predictions

All These Thoughts Derived at Seattle Coffee Works in Downtown Seattle
All These Thoughts Derived at Seattle Coffee Works in Downtown Seattle, a good place to enjoy the use of an iPad or Windows RT Tablet.

Ok, I’ll admit it, I have a soft spot in my heart for Windows 8. At least in the tablet form. I honestly prefer it over the iPad model of little icons displayed in a grid over a background with the bar of app icons at the bottom. Don’t get me wrong, I find the iPad remarkably usable and will have one for many years to come. I have sketching, drawing, movie making, picture taking, code writing, code pushing, deployment, comic books, books and other applications that I’m not about to just give up. But Windows 8 is very compelling.

I really hope it pushes Apple to make some change with their own UI to update it a bit. The icon placement and icon bar at the bottom is fine, but I’d really like to have more information available to me at a glance, which is something that Windows 8 on a tablet (or phone for that matter) enables in an extremely easy way.

In addition to that information, the stark design colors of Windows 8 are definitely better than the “we’re Apple and make futuristic devices that disrupt the markets but simulate every physical traditional thing we can”. Matter of fact I find Apple’s inane obsession with making accurate recreations of wood, notebooks, calendars, file cabinets and all that absurdly stupid. It’s great that some graphic artist can do that, but jeez, I’d like my interface to be as futuristic and disruptive as my device.

Overall, the two operating systems for tablet devices – iOS and Windows 8 (or RT, whatever they’re going to call it) – are pretty amazing in their own right. As of this moment though, I’ve come to the conclusion that I will very likely be getting at least one Windows 8 device. Emphasis though, on device – singular. If Microsoft has finally cracked that nut (their other hardware isn’t bad) than I might just start buying some Microsoft “device(s)” in the future that would obviously be running Windows OS. If they haven’t cracked the device nut, then it might be a short lived experiment.

I’m wondering, if you’re really not an Apple or Windows fan and you’re going to give either device an honest kicking in the coming months, I’d love to hear your input on the device. I’m sure I’ll hear a whole bunch of arbitrary ad hominem nonsense from the fans of either platform over the next few months. There will surely be a lot of FUD and propaganda thrown out of every media outlet either corporation can get their money funneled into too, I’m however keeping a close eye on blogs and real people providing feedback that have used both. That notice this or that difference, all those little things.

Being that we’re so flippin’ close to the release of Microsoft’s new flagship OS, Windows 8 and Apple, no doubt, will come back kicking with something this competitive cycle is starting to get interesting again!

Meanwhile, the wild card of Android is sitting in the sidelines. Will someone actually make a move and kick it into the fray? It seems to be the lethargic thing with zero marketing budget and zero existence. It’s sad even though it is such a massively robust environment and ecosystem compared to Windows RT/8 and much more open and capable than the iOS ecosystem.

With all that said, those thoughts thought, here’s my prediction. Yes, I’m going to be one of those guys and make a silly prediction. I’m not taking bets but this is it, this is the SWAG. Along with this SWAG though, I’m throwing out a hope. Because I honestly don’t want them to overtake Apple because I’d be absolutely sick if the absurd hubris of Microsoft came back. Nothing was worse during the 90s and 00s than Microsoft’s hubris (yeah, Apple’s was easy to ignore, Microsoft’s was just annoying)

My Windows 8 / Windows RT Tablet Prediction

  • Prediction: 90 million devices in about 2-3 years.
  • My Hope: 45 million devices in 2-3 years, 90 million in 3-4 years.

…and I leave this blog entry with a single question. What is your opinion and what device have you found that peaks your interest the most? Is it Samsung’s devices, Dell’s or simply the Microsoft Surface?