Patrick is a senior software developer at NAB in Melbourne. He is a certified .NET developer and has over 12 years of experience in application development. He is passionate about everything related to mobile and web and spends most of his time developing mobile applications on the iOS and Windows Phone platforms.

Patrick's articles

  1. Introduction to the Swift Programming Language

    One of the major and most surprising announcements to come out of Apple’s Worldwide Developers Conference was the introduction of Swift, a new programming language for Cocoa and Cocoa Touch.

    Swift allows you to create native applications for iOS and OS X, and can be used in your existing projects alongside Objective-C. It promises increased performance and numerous modern features.

    Here is a brief guide for getting started developing iOS applications with Swift today.

    We will setup a development environment to work with Swift, look into the language fundamentals and compare the syntax side by side with Objective-C and other familiar languages such as JavaScript and C#.

    At the end of this post we will create a simple but complete iOS application using Swift.

    Setting up your environment

    As with Objective-C you will require a current Mac and Xcode to develop with Swift.
    At this stage version 6 of Xcode is still in beta, it can be downloaded now but you must be a member of the iOS or Mac Developer Program.

    Log-in to the developer center and select the iOS 8 beta section, download Xcode from the Downloads section.

    It is a rather large file, around 2.5 GB in size, so it may take a while. Once the download is completed, open the file and install the application by following the prompts. If you already have version 5 of Xcode installed it will remain unaffected as the beta version is installed as a separate application.

    Go to the applications directory and launch Xcode 6.

    Launch XCode

    Accept the license agreement and wait for installation to complete.

    That’s it, you are now ready to start exploring and developing with Swift.