Book Image

Swift 3 New Features

By : Keith Elliott
Book Image

Swift 3 New Features

By: Keith Elliott

Overview of this book

Since Swift was introduced by Apple in WWDC 2015, it has gone on to become one of the most beloved languages to develop iOS applications with. In the new version, the Swift team aimed to take its adoption to the next level by making it available for new platforms and audiences. This book will very quickly get you up to speed and productive with Swift 3. You will begin by understanding the process of submitting new feature requests for future versions of Swift. Swift 3 allows you to develop and run your applications on a Linux machine. Using this feature, you will write your first Linux application using the debugger in Linux. Using Swift migrator, you will initiate a conversion from Swift 2.2 to Swift 3. Further on, you will learn how to interact with Cocoa libraries when importing Objective C to Swift. You will explore the function and operator changes new to Swift 3, followed by Collection and Closure changes. You will also see the changes in Swift 3 that allow you write tests easier with XCTest and debug your running code better with new formats as well. Finally, you will have a running server written completely in Swift on a Linux box. By the end of the book, you will know everything you need to know to dive into Swift 3 and build successful projects.
Table of Contents (16 chapters)
Swift 3 New Features
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
5
Function and Operator Changes – New Ways to Get Things Done

Planning ahead


Let's face it, Xcode is asking you to bravely use its black box tool to make irreversible changes to your project. While I'm a huge Apple fan, I doubt I would ever just press the shiny new migrate button without thinking about what could go wrong in the process. I'm not in the business of scrapping projects and starting from scratch. Honestly, who really is? To avoid a potentially terrible time with the Migrator, you really should consider doing everything listed below as pre-work before migrating your project:

  1. Ensure that your existing codebase is making use of a version control system such as Git (https://git-scm.com) or Subversion (https://subversion.apache.org). If you run the Migrator and the output doesn't convert things as expected (or other unexpected things happen), you will have peace of mind that you can always get back to your original version.

  2. Make sure your project compiles on the latest version of Xcode (7.3 or 7.3.1). You want to make sure everything, including...