First Impressions of iOS Development & Swift

For the past 8 months my trusty Galaxy Nexus has had terrible trouble with the microphone and dropping calls. This wouldn’t be much of a problem in normal use – mostly texting and checking email – but while talking to investors, mentors, & preforming other business related activities it is extremely embarrassing & unprofessional. Normally I would just go get the latest flag ship Android – Nexus 5 I was looking at the time, however, the Google Play Device store has been sold out for so long that I gave up. Looking online I could get a Nexus 5 for above market value, which I really had no interest in doing. Thus, I had this crazy idea to jump ship and get an iPhone – something I have never really thought about seriously before.

 

I am in no way aligned with any company on these choices, but I have alway felt Android offered more features I liked. Over time though the amount of butchered Android releases I have seen on Samsung devices has really turned my off the idea of the open source OS. Working in design I can only cringe so many times before start to associate Android with poor design choices. I think the final point on why I flipped though was that I now have a Macbook, & iPad – so an iPhone just made more sense…. that’s enough, I don’t think you want to read my sudo-science justifications of purchasing an iPhone.

 

I bought an iPhone & made 3 apps in my first month
 
I started learning Swift from a tutorial online and eventually reactivated my Teamtreehouse membership. I flew through the tutorials over probably a combined 4-6 hours, making two simple apps. I then moved on and made a  game based on a YouTube tutorial – again only took around 2 hours to finish. The main things I want to talk about are twofold:
  1. The ease of the transition to Swift with an OOP & JS background
  2. The awesome IDE that is Xcode & how simple it was to get started

The Ease of the Transition to Swift

 
I have been programming for 5 years – beyond front-end for just 3 – and am fairly confident that I can pick up anything new within a few days and learn the basics. I strongly belive future of programming is in being able to learn new things easily, not in legacy specialization. Specialization will always be preferred for big projects and long term employment, but I think that being extremely flexible opens more doors and promotes more creativity. My point is I found it pretty simple to grasp the basics of Swift – it appears to have every function named by what it does (I know crazy right), and them some minor abbreviations for classes. Coming from a year and a half of solid Ruby on Rails dev I really appreciated the naming conventions and OOP structure of the classes.

 

My only gripe with Swift was the forced verboseness of the variable declarations. Working in web development – JS – I get very lazy regarding always declaring variables before use – and just forget completely about assigning types to them. Static immutable variables are something I haven’t worked with in a while. They make a lot of sense and force some good practices, you have to slow down and plan what you are doing as well which is sometimes good. Overall though the language seems very easy to pick up and work with, which was a very nice intro to mobile development.

 

I have no idea how good it is compared to Objective-C, but it seems that I will have to learn at least some Objective-C to make sense of everything I can do in iOS.

The Awesome IDE That is Xcode

I have tried to do mobile development before, on Android. I have never got passed the initial instal and simulator for a “Hello World” app on Android. Don’t get me wrong I have worked with Java before, but Android development just never happened. It was such a pain to setup and get running that by the time I was ready to code I was so disinterested in the process that I just never returned to it. I have probably installed the SDK around 8-10 times and never deployed to an actual device.
With Xcode I had an app on my phone within hours.
 
I paid my $99 and connected my account to Xcode. It forced me to click some buttons and boom: it was installing my demo app on my phone. I had heard people gripe about provisioning profiles and the things with iOS development and am happy that it looks like I joined the party well after many workflow hiccups have been ironed out. I have worked with Xcode’s command line tools for various other projects and have always had it installed and up to date – I just never really bothered trying to figure out what it did – the interface is honestly rather confusing, but miles better than any IDE I have used thus far. I mainly stick to the console and Sublime Text when working, IDE’s just always seem to add so much overhead and tons of functions that I will never use. However, being forced to use Xcode was an enlightening experience. I truly enjoyed finding out that my thread stock could be tracked action by action, the break points work great, the errors are almost useful, & adding images and visuals is a breeze.

 

I have no doubts that after more usage I will have some complaints, but for a beginner Xcode is very friendly in my opinion.

More to Come

 
I have set myself come goals over the next few years for mobile development. I don’t plan on moving to mobile in as serious sense anytime soon, but I would like to stay up to date on what is happening and be able hack out an app if needed. I have two main goals in mind right now:

 

  1. Have an app in the App store by my next birthday (February)
  2. Have a good app – making some money – in the App store by 30 (4 years out)
    1. This will require some more apps to learn along the way, but a solid goal to start with
I really have no complaints about the iOS dev environment so far. Very impressive and I am sure it will continue to get better. Swift is a cool little language with a pretty good set of docs. I really wish it wasn’t specific to iOS, but hey, maybe one of the up coming cross platform frameworks will be a better fit for me (so far I have used phone gap and meteor – both cordova based for mobile).

Leave a Reply

Your email address will not be published. Required fields are marked *