So far we’ve covered a lot of how Swift the language works, some WatchKit tutorials, and how to get started with some Cocoa classes. However, we have not really done much in the way of actually writing sample apps on the Coding Explorer Blog. It was covered a little bit in the WatchKit tutorials, but there is a lot done there specific to getting WatchKit working. Let’s go all the way back to the basics, let’s write a Hello World app.
For those that don’t know, it is very common to have the first program written by somebody learning a new language be one that somehow displays “Hello World!” At least according to Wikipedia, this goes back to an example from “The C Programming Language” book by Brian Kernighan and Dennis Ritchie. Now, of course the simplest form of this in Swift is just:
print("Hello, World!")
But we’ll do something a bit more advanced than that. You don’t often (or ever) see a console on your iOS device, so that doesn’t help us make an app directly.
This is a pretty basic tutorial, but I want to make it pretty comprehensive for how to start an iOS app. This will even include going over some of the features of the IDE (integrated Development Environment), like the different editors, the utility pane, and the various inspectors therein. This may be a bit too basic for some, but I want this site to be a place for all kinds of iOS developers, especially the beginners. We all had to start sometime, and those are the people I want to help in particular today.
Also, I figured that it’s a new year, let’s start it with how to start a new app.
[Read more…]