万本电子书0元读

万本电子书0元读

顶部广告

Swift 3 New Features电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Keith Elliott

出  版  社:Packt Publishing

出版时间:2016-10-06

字       数:86.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
A fast-paced guide to get you up and running with Swift 3 and its new featuresAbout This Book·Get up to date with the latest changes to Swift 3·Make your life easier by knowing how to port your Swift code to the latest version·Learn how to write programs that work on most of the major platforms such as iOS and LinuxWho This Book Is ForThe book is for those who are familiar with Swift but are in need of clear guidance on what's changed in the latest version and the new features.What You Will Learn·Migrate a Swift 2.2 project to Swift 3·Understand the workings of Swift Package Manager·Interact with Cocoa libraries when importing Objective C to Swift·Explore the function and operator changes new in Swift 3·Work with the advanced type changes, attribute improvements, and floating point type improvements in Swift·Discover the changes in the Swift API and see how Objective-C can be manipulated in the current API·Implement the new features central to Swift Testing and understand the new debug features·Create server-side applications using Swift 3In DetailSince 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.Style and approachThe book takes a tutorial-based approach offering an overview of the new features introduced in the latest version of Swift. It includes relevant examples of how code and concepts change when it comes to working on Swift 3 compared to previous versions.
目录展开

Swift 3 New Features

Swift 3 New Features

Credits

About the Author

About the Reviewer

www.PacktPub.com

Why subscribe?

Preface

Objectives and achievements

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. What Were They Thinking?

Apple's goals for Swift 3

Open source Swift

Contributing to Swift

Swift evolution process

Overview of accepted proposals for Swift 3

Summary

2. Discovering New Territories – Linux at Last!

Downloading Swift

Swift 3 on Mac

Swift 3 on Linux

Using the REPL

Swift Package Manager

Our first Swift program

Summary

3. Migrating to Swift 3 to Be More Swifty

How can you migrate your project…

Option1 - Migrating to Swift 3

Option 2 - Migrating to Swift 2.3

Planning ahead

Migrating with Xcode's Swift migration tool

Quick strategies for addressing issues

Summary

4. Changes to Swifts Core Will Have You Asking for More

The grand renaming

Referencing Objective-C code in Swift 3

Referencing the Objective-C selector of property getters and setters - SE-0064

Referencing Objective-C key paths [SE-0062]

Importing code from Objective-C and C APIs to Swift 3

Importing Objective-C constants as Swift types [SE-0033]

Importing as Struct

Importing as Enum

Importing Objective-C lightweight generics [SE-0057]

Importing as member [SE-0044]

Defining an initializer

Creating getters and setters

Adding methods

Creating static variables

Summary

5. Function and Operator Changes – New Ways to Get Things Done

Function declaration changes

Consistent parameter labeling [SE-0046]

Removing currying func syntax in declaration [SE0002]

Warning on Unused Results by Default [SE-0047]

Removing var from function parameter lists [SE-0003]

Removing ++ and -- operators [SE-0004]

Removing C-style for loops [SE-0007]

Removing implicit tuple splat from functions [SE-0029]

Adjusting inout declarations for type decoration [SE-0031]

Replacing equal signs with colons for attribute arguments [SE-0040]

Standardizing function type argument syntax to require parentheses [SE-0066]

Enforcing the order of defaulted parameters [SE-0060]

Making optional requirements Objective-C only [SE-0070]

Summary

6. Extra, Extra Collection and Closure Changes That Rock!

Collection and sequence type changes

Lazy FlatMap for sequence of optional [SE-0008]

Adding a first(where:) method to Sequence [SE-0032]

Add sequence(first: next:) and sequence(state: next:) [SE-0094]

A new model for collections and indices [SE-0065]

Introducing the Collection protocol

Conforming to the Collection protocol

New Range and associated indices types

Quick takeaways

Closure changes for Swift 3

Limiting inout Capture of @noescape Closures [SE-0035]

Resolution

Making non-escaping closures the default [SE-0103]

Summary

7. Hold onto Your Chair; Advanced Type Changes Are Here!

Unmanaged and UnsafePointer changes

Changing Unmanaged to use UnsafePointer [SE-0017]

Making UnsafePointer explicit using Optional [SE-0055]

Adding UnsafeRawPointer [SE-0107]

Type aliases and protocol changes

Generic type aliases [SE-0048]

Type aliases in protocols and protocol extensions [SE-0092]

Floating point changes

Enhanced Floating point protocols [SE-0067]

New rounding functions on the FloatingPoint protocol [SE-0113]

Summary

8. Oh Goodness! Look Whats New in the Foundation Framework

Mutability and Foundation value types

Value types versus reference types

Nested enumerations

Strongly typed string enumerations

Class properties

Type safe access with value types

Measurements and units

Measurement

Unit and dimension

Custom units

Custom Dimension types

Convert functions

Formatting measurements

Summary

9. Improving Your Code with Xcode Server and LLDB Debugging

Continuous integration overview with Xcode server

Bot features

Monitoring and managing bots

Configuring Xcode server

Adding repositories for the Xcode server

Configuring bots

Managing and monitoring your integration runs

Debugging with LLDB

LLDB command syntax

Managing breakpoints

Creating a breakpoint

Listing breakpoints

Modifying a breakpoint

Enabling and disabling a breakpoint

Deleting a breakpoint

Command aliases

Summary

10. Exploring Swift on the Server

IBM Swift Package catalog

Introducing our server project

Project description and dependencies

Setting up our environment and project

The Vapor framework

Routing

Creating views

Public resources

Defining our shop view

Slack integration

Making a custom integration

Updating our server to post to Slack

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部