Skip to content

PacktPublishing/Swift-4-Programming-Cookbook

Repository files navigation

Swift 4 Programming Cookbook

This is the code repository for Swift 4 Programming Cookbook, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

About the Book

Swift is an exciting, general purpose programming language. It's open sourcing and porting to Linux present many opportunities to use Swift outside of iOS and OSX app development. As a result, it's a great time to become a Swift developer!

This book begins with Swift Constructs and moves on to Data Wrangling. You will then learn how to use Swift with other languages. Also look at how to perform object-oriented programming, Functional Reactive programming, and Protocol Oriented Programming with Swift. Finally, you will get to grips with server-side Swift, its performance, and responsiveness in Swift.

With this recipe-based book, you will look at Swift’s merits and benefits by covering the problem and solutions on it. This collection of concise, task-oriented recipes immediately makes you productive with Swift, with solutions ranging from core programming topics such as functions, protocol, error handling, and generics to advanced topics such as memory management and concurrency. Finally, you will learn how to improve code efficiency and enhance your application’s performance.

Instructions and Navigation

All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

The code will look like the following:

func poolBallType(forNumber number: Int) -> PoolBallType { 
    if number < 8 { 
        return .solid 
    } else if number > 8 { 
        return .stripe 
    } else { 
        return .black 
    } 
}

To follow along with the examples in this book, you will need a computer running macOS 10.12.6 or greater. You also need an Apple ID to download and install Xcode 9 from the Mac App Store. The chapter on server-side Swift also requires Ubuntu 16.04 LTS.

Related Products

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781786460899

About

Swift 4 Programming Cookbook, published by Packt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages