Swift: everything you need to know about Apple’s programming language

Swift is a programming language developed by Apple. You can program apps with it for iOS and OS X. This guide tells you all about Swift.

What is SWIFT?

Swift is a powerful and intuitive programming for iOS, OSX, and watchOS. With it you can build apps for the iPhone, iPad, iPod touch, Mac, and Apple Watch. Initially Swift was only available on the Mac, but in the course of 2015 Linux will be supported too.

Swift OSX
Develop OSX apps with Swift

Swift was announced at the developer conference WWDC 2014 and later that year got a little update. At WWDC 2015 Apple announced Swift to 2.0. The programming language will be open source. Swift is developed since 2010 within Apple and used ideas from Objective-C, Ruby, Python, C# and other programming languages. On the Swift page on Apple.com, you can read more about the principles behind Swift. With Start Developing iOS Apps, you can get an idea on what’s involved in making an app.

Swift works with Objective-C

Developers wishing to work with Swift can get started right away. Apple provides all the programming tools via the Apple developer program. If you’ve already written code in C or Objective-C, Swift will be familiar. The first line of code that you could write Swift in is this:

print ("Hello, world!")

You will find in the iOS Developer Library more information on programming with Swift, assigning values ​​to variables and the different operators.

Swift works flawlessly with Objective-C. You don’t have to throw away the code of an existing iOS app if you want to switch to Swift. If you want to create a new app, you can program it completely in Swift. But you can also add new features to an existing app. Swift code can exist alongside Objective-C files exist within the same project. You have full access to the Objective-C API, so you can change easily. For new projects, it may be smarter to immediately start with Swift only.

Using Swift: this is what you need

Xcode Swift
Use Xcode to develop Swift apps.

To use Swift, you must download Xcode 7 with Swift 2 from the Resources page in the Apple Developer Center. Here you will find the latest beta versions of Xcode, the Swift playground and various reference books to learn to work with Swift.

Learn Swift with books
Apple has created a 500-page book, with which you can learn Swift. This, together with other textbooks is free to download from the iBookstore.


Swift 2:

Learn Swift with a course
You can learn Swift via free programming course at Stanford University, that can be found in iTunes. Apple has made a swift-programming course through iTunes U available, which teachers can use in their lessons.

Click to rate this post!
[Total: 1 Average: 5]