swift_in_depth_table_of_contents

Swift in Depth Table of Contents

Return to Swift in Depth

Table of Contents


Brief Table of Contents

Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgements

About this Book

Chapter 1. Introducing Swift in depth

Chapter 2. Modeling data with enums

Chapter 3. Writing cleaner properties

Chapter 4. Making optionals second nature

Chapter 5. Demystifying initializers

Chapter 6. Effortless error handling

Chapter 7. Generics

Chapter 8. Putting the pro in protocol-oriented programming

Chapter 9. Iterators, sequences, and collections

Chapter 10. Understanding map, flatMap, and compactMap

Chapter 11. Asynchronous error handling with Result

Chapter 12. Protocol extensions

Chapter 13. Swift patterns

Chapter 14. Delivering quality Swift code

Chapter 15. Where to Swift from here

Index

Detailed Table of Contents

Chapter 1. Introducing Swift in depth

1.1. The sweet spot of Swift

1.2. Below the surface

1.3. Swift’s downsides

1.3.1. Swift Module stability

1.3.2. Swift Strictness

1.3.3. Swift Protocols are tricky

1.3.4. Swift Concurrency

1.3.5. Venturing away from Apple’s Swift platforms

1.3.6. Swift Compile times

1.4. What you will learn in this Swift book

1.5. How to make the most of this Swift book

1.6. Minimum qualifications

1.7. Swift version

Summary

Chapter 2. Swift Modeling data with enums

2.1. Swift Or vs. and

2.1.1. Swift Modeling data with a struct

2.1.2. Swift Turning a struct into an enum

2.1.3. Swift Deciding between structs and enums

2.2. Swift Enums for polymorphism

2.2.1. Compile-time polymorphism

2.3. Enums instead of subclassing

2.3.1. Forming a model for a workout app

2.3.2. Creating a superclass

2.3.3. The downsides of subclassing

2.3.4. Refactoring a data model with enums

2.3.5. Deciding on subclassing or enums

2.3.6. Exercises

2.4. Algebraic data types

2.4.1. Sum types

2.4.2. Product types

2.4.3. Distributing a sum over an enum

2.4.4. Exercise

2.5. A safer use of strings

2.5.1. Dangers of raw values

2.5.2. Matching on strings

2.5.3. Exercises

2.6. Closing thoughts

Summary

Answers

Chapter 3. Writing cleaner properties

3.1. Computed properties

3.1.1. Modeling an exercise

3.1.2. Converting functions to computed properties

3.1.3. Rounding up

3.2. Lazy properties

3.2.1. Creating a learning plan

3.2.2. When computed properties don’t cut it

3.2.3. Using lazy properties

3.2.4. Making a lazy property robust

3.2.5. Mutable properties and lazy properties

3.2.6. Exercises

3.3. Property observers

3.3.1. Trimming whitespace

3.3.2. Trigger property observers from initializers

3.3.3. Exercises

3.4. Closing thoughts

Summary

Answers

Chapter 4. Making optionals second nature

4.1. The purpose of optionals

4.2. Clean optional unwrapping

4.2.1. Matching on optionals

4.2.2. Unwrapping techniques

4.2.3. When you’re not interested in a value

4.3. Variable shadowing

4.3.1. Implementing CustomStringConvertible

4.4. When optionals are prohibited

4.4.1. Adding a computed property

4.5. Returning optional strings

4.6. Granular control over optionals

4.6.1. Exercises

4.7. Falling back when an optional is nil

4.8. Simplifying optional enums

4.8.1. Exercise

4.9. Chaining optionals

4.10. Constraining optional Booleans

4.10.1. Reducing a Boolean to two states

4.10.2. Falling back on true

4.10.3. A Boolean with three states

4.10.4. Implementing RawRepresentable

4.10.5. Exercise

4.11. Force unwrapping guidelines

4.11.1. When force unwrapping is “acceptable”

4.11.2. Crashing with style

4.12. Taming implicitly unwrapped optionals

4.12.1. Recognizing IUOs

4.12.2. IUOs in practice

4.12.3. Exercise

4.13. Closing thoughts

Summary

Answers

Chapter 5. Demystifying initializers

5.1. Struct initializer rules

5.1.1. Custom initializers

5.1.2. Struct initializer quirk

5.1.3. Exercises

5.2. Initializers and subclassing

5.2.1. Creating a board game superclass

5.2.2. The initializers of BoardGame

5.2.3. Creating a subclass

5.2.4. Losing convenience initializers

5.2.5. Getting the superclass initializers back

5.2.6. Exercise

5.3. Minimizing class initializers

5.3.1. Convenience overrides

5.3.2. Subclassing a subclass

5.3.3. Exercise

5.4. Required initializers

5.4.1. Factory methods

5.4.2. Protocols

5.4.3. When classes are final

5.4.4. Exercises

5.5. Closing thoughts

Summary

Answers

Chapter 6. Effortless error handling

6.1. Errors in Swift

6.1.1. The Error protocol

6.1.2. Throwing errors

6.1.3. Swift doesn’t reveal errors

6.1.4. Keeping the environment in a predictable state

6.1.5. Exercises

6.2. Error propagation and catching

6.2.1. Propagating errors

6.2.2. Adding technical details for troubleshooting

6.2.3. Centralizing error handling

6.2.4. Exercises

6.3. Delivering pleasant APIs

6.3.1. Capturing validity within a type

6.3.2. try?

6.3.3. try!

6.3.4. Returning optionals

6.3.5. Exercise

6.4. Closing thoughts

Summary

Answers

Chapter 7. Generics

7.1. The benefits of generics

7.1.1. Creating a generic function

7.1.2. Reasoning about generics

7.1.3. Exercise

7.2. Constraining generics

7.2.1. Needing a constrained function

7.2.2. The Equatable and Comparable protocols

7.2.3. Constraining means specializing

7.2.4. Implementing Comparable

7.2.5. Constraining vs. flexibility

7.3. Multiple constraints

7.3.1. The Hashable protocol

7.3.2. Combining constraints

7.3.3. Exercises

7.4. Creating a generic type

7.4.1. Wanting to combine two Hashable types

7.4.2. Creating a Pair type

7.4.3. Multiple generics

7.4.4. Conforming to Hashable

7.4.5. Exercise

7.5. Generics and subtypes

7.5.1. Subtyping and invariance

7.5.2. Invariance in Swift

7.5.3. Swift’s generic types get special privileges

7.6. Closing thoughts

Summary

Answers

Chapter 8. Putting the pro in protocol-oriented programming

8.1. Runtime versus compile time

8.1.1. Creating a protocol

8.1.2. Generics versus protocols

8.1.3. A trade-off with generics

8.1.4. Moving to runtime

8.1.5. Choosing between compile time and runtime

8.1.6. When a generic is the better choice

8.1.7. Exercises

8.2. The why of associated types

8.2.1. Running into a shortcoming with protocols

8.2.2. Trying to make everything a protocol

8.2.3. Designing a generic protocol

8.2.4. Modeling a protocol with associated types

8.2.5. Implementing a PAT

8.2.6. PATs in the standard library

8.2.7. Other uses for associated types

8.2.8. Exercise

8.3. Passing protocols with associated types

8.3.1. Where clauses with associated types

8.3.2. Types constraining associated types

8.3.3. Cleaning up your API with protocol inheritance

8.3.4. Exercises

8.4. Closing thoughts

Summary

Answers

Chapter 9. Iterators, sequences, and collections

9.1. Iterating

9.1.1. IteratorProtocol

9.1.2. The IteratorProtocol

9.1.3. The Sequence protocol

9.1.4. Taking a closer look at Sequence

9.2. The powers of Sequence

9.2.1. filter

9.2.2. forEach

9.2.3. enumerated

9.2.4. Lazy iteration

9.2.5. reduce

9.2.6. reduce into

9.2.7. zip

9.2.8. Exercises

9.3. Creating a generic data structure with Sequence

9.3.1. Seeing bags in action

9.3.2. Creating a BagIterator

9.3.3. Implementing AnyIterator

9.3.4. Implementing ExpressibleByArrayLiteral

9.3.5. Exercise

9.4. The Collection protocol

9.4.1. The Collection landscape

9.4.2. MutableCollection

9.4.3. RangeReplaceableCollection

9.4.4. BidirectionalCollection

9.4.5. RandomAccessCollection

9.5. Creating a collection

9.5.1. Creating a travel plan

9.5.2. Implementing Collection

9.5.3. Custom subscripts

9.5.4. ExpressibleByDictionaryLiteral

9.5.5. Exercise

9.6. Closing thoughts

Summary

Answers

Chapter 10. Understanding map, flatMap, and compactMap

10.1. Becoming familiar with map

10.1.1. Creating a pipeline with map

10.1.2. Mapping over a dictionary

10.1.3. Exercises

10.2. Mapping over sequences

10.2.1. Exercise

10.3. Mapping over optionals

10.3.1. When to use map on optionals

10.3.2. Creating a cover

10.3.3. A shorter map notation

10.3.4. Exercise

10.4. map is an abstraction

10.5. Grokking flatMap

10.5.1. What are the benefits of flatMap?

10.5.2. When map doesn’t cut it

10.5.3. Fighting the pyramid of doom

10.5.4. flatMapping over an optional

10.6. flatMapping over collections

10.6.1. flatMapping over strings

10.6.2. Combining flatMap with map

10.6.3. Using compactMap

10.6.4. Nesting or chaining

10.6.5. Exercises

10.7. Closing thoughts

Summary

Answers

Chapter 11. Asynchronous error handling with Result

11.1. Why use the Result type?

11.1.1. Result is like Optional, with a twist

11.1.2. Understanding the benefits of Result

11.1.3. Creating an API using Result

11.1.4. Bridging from Cocoa Touch to Result

11.2. Propagating Result

11.2.1. Typealiasing for convenience

11.2.2. The search function

11.3. Transforming values inside Result

11.3.1. flatMapping over Result

11.3.2. Weaving errors through a pipeline

11.3.3. Exercises

11.3.4. Finishing up

11.4. Handling multiple errors with Result

11.4.1. Mixing Result with throwing functions

11.4.2. Exercise

11.5. Error recovery with Result

11.6. Impossible failure and Result

11.6.1. When a protocol defines a Result

11.7. Closing thoughts

Summary

Answers

Chapter 12. Protocol extensions

12.1. Class inheritance vs. Protocol inheritance

12.1.1. Modeling data horizontally instead of vertically

12.1.2. Creating a protocol extension

12.1.3. Multiple extensions

12.2. Protocol inheritance vs. Protocol composition

12.2.1. Builder a mailer

12.2.2. Protocol inheritance

12.2.3. The composition approach

12.2.4. Unlocking the powers of an intersection

12.2.5. Exercise

12.3. Overriding priorities

12.3.1. Overriding a default implementation

12.3.2. Overriding with protocol inheritance

12.3.3. Exercise

12.4. Extending in two directions

12.4.1. Opting in to extensions

12.4.2. Exercise

12.5. Extending with associated types

12.5.1. A specialized extension

12.5.2. A wart in the extension

12.6. Extending with concrete constraints

12.7. Extending Sequence

12.7.1. Looking under the hood of filter

12.7.2. Creating the Inspect method

12.7.3. Exercise

12.8. Closing thoughts

Summary

Answers

Chapter 13. Swift patterns

13.1. Dependency injection

13.1.1. Swapping an implementation

13.1.2. Passing a custom Session

13.1.3. Constraining an associated type

13.1.4. Swapping an implementation

13.1.5. Unit testing and Mocking with associated types

13.1.6. Using the Result type

13.1.7. Exercise

13.2. Conditional conformance

13.2.1. Free functionality

13.2.2. Conditional conformance on associated types

13.2.3. Making Array conditionally conform to a custom protocol

13.2.4. Conditional conformance and generics

13.2.5. Conditional conformance on your types

13.2.6. Exercise

13.3. Dealing with protocol shortcomings

13.3.1. Avoiding a protocol using an enum

13.3.2. Type erasing a protocol

13.3.3. Exercise

13.4. An alternative to protocols

13.4.1. With great power comes great unreadability

13.4.2. Creating a generic struct

13.4.3. Rules of thumb for polymorphism

13.5. Closing thoughts

Summary

Answers

Chapter 14. Delivering quality Swift code

14.1. API documentation

14.1.1. How Quick Help works

14.1.2. Adding callouts to Quick Help

14.1.3. Documentation as HTML with Jazzy

14.2. Comments

14.2.1. Explain the “why”

14.2.2. Only explain obscure elements

14.2.3. Code has the truth

14.2.4. Comments are no bandage for bad names

14.2.5. Zombie code

14.3. Settling on a style

14.3.1. Consistency is key

14.3.2. Enforcing rules with a linter

14.3.3. Installing SwiftLint

14.3.4. Configuring SwiftLint

14.3.5. Temporarily disabling SwiftLint rules

14.3.6. Autocorrecting SwiftLint rules

14.3.7. Keeping SwiftLint in sync

14.4. Kill the managers

14.4.1. The value of managers

14.4.2. Attacking managers

14.4.3. Paving the road for generics

14.5. Naming abstractions

14.5.1. Generic versus specific

14.5.2. Good names don’t change

14.5.3. Generic naming

14.6. Checklist

14.7. Closing thoughts

Summary

Chapter 15. Where to Swift from here

15.1. Build frameworks that build on Linux

15.2. Explore the Swift Package Manager

15.3. Explore frameworks

15.4. Challenge yourself

15.4.1. Join the Swift evolution

15.4.2. Final words

Index

List of Figures

List of Listings

Fair Use Sources

Swift Vocabulary List (Sorted by Popularity)

Swift Programming Language, Swift Compiler, Swift Standard Library, Swift Playground, Swift REPL, Swift SwiftUI, Swift Combine Framework, Swift Foundation Framework, Swift Codable Protocol, Swift Decodable Protocol, Swift Encodable Protocol, Swift URLSession, Swift async/await, Swift Task, Swift Actor, Swift Sendable, Swift MainActor, Swift GlobalActor, Swift Concurrent Code, Swift Structured Concurrency, Swift Result Type, Swift Optionals, Swift let Keyword, Swift var Keyword, Swift func Keyword, Swift class Keyword, Swift struct Keyword, Swift enum Keyword, Swift protocol Keyword, Swift extension Keyword, Swift guard Keyword, Swift if Keyword, Swift else Keyword, Swift switch Keyword, Swift case Keyword, Swift for Keyword, Swift while Keyword, Swift repeat Keyword, Swift do Keyword, Swift try Keyword, Swift catch Keyword, Swift defer Keyword, Swift throw Keyword, Swift throws Keyword, Swift rethrows Keyword, Swift return Keyword, Swift inout Keyword, Swift typealias Keyword, Swift associatedtype Keyword, Swift where Keyword, Swift import Keyword, if Conditional Compilation, warning Directive, error Directive, file, line, function, column, dsohandle, Swift Self Keyword, Swift self Keyword, Swift Any Type, Swift AnyObject Protocol, Swift AnyClass, Swift AnyHashable, Swift Never Type, Swift Void Type, Swift Bool Type, Swift Int Type, Swift UInt Type, Swift Double Type, Swift Float Type, Swift Character Type, Swift String Type, Swift Substring Type, Swift Array Type, Swift Dictionary Type, Swift Set Type, Swift Range Type, Swift ClosedRange Type, Swift PartialRangeUpTo, Swift PartialRangeThrough, Swift PartialRangeFrom, Swift Optional Chaining, Swift Optional Binding, Swift Implicitly Unwrapped Optional, Swift nil Literal, Swift as Keyword, Swift as, Swift as! Keyword, Swift is Keyword, Swift try, Swift try! Keyword, Swift weak Reference, Swift unowned Reference, Swift ARC (Automatic Reference Counting), Swift RAII (Resource Acquisition Is Initialization), Swift Memory Safety, Swift Copy-on-Write Semantics, Swift Value Semantics, Swift Reference Semantics, Swift Deinitialization, Swift init Keyword, Swift deinit Keyword, Swift Convenience Initializer, Swift Failable Initializer, Swift Required Initializer, Swift Inheritance, Swift Final Keyword, Swift Open Keyword, Swift Dynamic Keyword, Swift Lazy Keyword, Swift Key Paths, Swift @objc Attribute, Swift @IBOutlet Attribute, Swift @IBAction Attribute, Swift @NSManaged Attribute, Swift @available Attribute, Swift @discardableResult Attribute, Swift @dynamicCallable Attribute, Swift @dynamicMemberLookup Attribute, Swift @frozen Attribute, Swift @inlinable Attribute, Swift @inline(__always) Attribute, Swift @main Attribute, Swift @propertyWrapper Attribute, Swift @resultBuilder Attribute, Swift @testable Attribute, Swift @UIApplicationMain Attribute, Swift @MainActor Attribute, Swift @Sendable Attribute, Swift @escaping Keyword, Swift @autoclosure Keyword, Swift @convention Keyword, Swift @escaping Closures, Swift Non-Escaping Closures, Swift Trailing Closure Syntax, Swift Capturing Closures, Swift Closure Expressions, Swift Map Function (on collections), Swift Filter Function (on collections), Swift Reduce Function (on collections), Swift ForEach, Swift sorted Method, Swift reversed Method, Swift joined Method, Swift compactMap Method, Swift flatMap Method, Swift contains Method, Swift isEmpty Property, Swift count Property, Swift append Method, Swift insert Method, Swift remove Method, Swift removeAll Method, ) Method, Swift indices Property, Swift first Property, Swift last Property, Swift popLast Method, Swift prefix Method, Swift suffix Method, Swift split Method, Swift enumerated Method, ) Method, ) Method, Swift replaceSubrange Method, Swift capacity Property (Array), Swift reserveCapacity Method (Array), Swift Hasher Struct, Swift Hashable Protocol, Swift Equatable Protocol, Swift Comparable Protocol, Swift Identifiable Protocol, Swift CustomStringConvertible Protocol, Swift CustomDebugStringConvertible Protocol, Swift Sequence Protocol, Swift Collection Protocol, Swift BidirectionalCollection Protocol, Swift RandomAccessCollection Protocol, Swift MutableCollection Protocol, Swift RangeReplaceableCollection Protocol, Swift Indexable Protocol (deprecated), Swift Strideable Protocol, Swift Error Protocol, Swift LocalizedError Protocol, Swift DecodingError, Swift EncodingError, Swift URLError, Swift NSError Interop, Swift Throwing Functions, Swift Throwing Initializers, Swift Error Handling, Swift Result.success Case, Swift Result.failure Case, Swift Result.get Method, Swift Swift.Error Built-in Protocol, Swift Mirror Reflecting, Swift Mirror Type, Swift KeyValuePairs Type, Swift stride Function, Swift max Function, Swift min Function, Swift abs Function, Swift repeatElement Function, Swift zip Function, Swift debugPrint Function, Swift dump Function, Swift fatalError Function, Swift precondition Function, Swift preconditionFailure Function, Swift assert Function, Swift assertionFailure Function, Swift global Functions like print, Swift print Function, Swift localizedDescription Property (Error), Swift MemoryLayout Struct, Swift withUnsafePointer, Swift withUnsafeMutablePointer, Swift withUnsafeBytes, Swift withUnsafeMutableBytes, Swift UnsafePointer Type, Swift UnsafeMutablePointer Type, Swift UnsafeBufferPointer Type, Swift UnsafeMutableBufferPointer Type, Swift UnsafeRawPointer Type, Swift UnsafeMutableRawPointer Type, Swift UnsafeRawBufferPointer Type, Swift UnsafeMutableRawBufferPointer Type, Swift ManagedBuffer, Swift Unmanaged Reference, Swift C Interop, Swift Objective-C Interop, Swift Bridging Header, Swift @objcMembers Attribute, Swift dynamicCallable integration, Swift dynamicMemberLookup integration, Swift Property Wrappers, Swift @State (SwiftUI), Swift @Binding (SwiftUI), Swift @ObservedObject (SwiftUI), Swift @Environment (SwiftUI), Swift @EnvironmentObject (SwiftUI), Swift @Published (Combine), Swift @AppStorage (SwiftUI), Swift @SceneStorage (SwiftUI), Swift @main (entry point), Swift ClangImporter, Swift Swift Package Manager, Swift Package.swift Manifest, Swift target in Package.swift, Swift dependency in Package.swift, Swift product in Package.swift, Swift swift build Command, Swift swift test Command, Swift swift run Command, Swift swift package Command, Swift swift-format Tool, Swift swiftlint (3rd party) , Swift swiftSyntax (3rd party) , Swift raw String Literals, Swift multi-line String Literals, Swift String Interpolation, Swift StringInterpolationProtocol, Swift CustomStringInterpolation, Swift Character Properties, Swift Unicode Scalars, Swift Extended Grapheme Clusters, Swift String.Index Type, Swift StringProtocol, Swift substring operations, Swift UTF8View, Swift UTF16View, Swift UnicodeScalarView, Swift @available Attribute for OS versions, if swift(>=...), if canImport(...) , Swift @_exported import, Swift @_implementationOnly import, Swift Automatic Reference Counting (ARC), Swift weak var, Swift unowned var, Swift strong reference, Swift reference cycle, Swift capture list in closures, Swift closure capture semantics, Swift property Observer (willSet/didSet), Swift computed Properties, Swift stored Properties, Swift static Properties, Swift class Properties, Swift lazy Properties, Swift property initializers, Swift property wrappers repeated, Swift func Overloading, Swift operator Overloading, Swift custom Operators, Swift postfix Operators, Swift prefix Operators, Swift infix Operators, Swift precedencegroups, Swift Key-Path Expressions, Swift KeyPath Type, Swift WritableKeyPath Type, Swift ReferenceWritableKeyPath Type, Swift PartialKeyPath Type, Swift AnyKeyPath Type, Swift switch Pattern Matching, Swift guard Statement, Swift defer Statement, Swift if let Pattern, Swift if var Pattern, Swift while let Pattern, Swift do-catch Blocks, Swift enumerations with associated values, Swift enumerations with raw values, Swift indirect enum, Swift @frozen enum, Swift @objc enum (enum with Objective-C), Swift mutating keyword in structs, Swift nonmutating keyword in protocol extension, Swift protocol Composition, Swift protocol Inheritance, Swift existential types, Swift opaque Result Type (some keyword), Swift some Keyword (Opaque Return), Swift any Keyword (Existential), Swift concurrency async Keyword, Swift concurrency await Keyword, Swift concurrency TaskPriority, Swift concurrency TaskGroup, Swift concurrency AsyncSequence, Swift concurrency AsyncStream, Swift concurrency AsyncThrowingStream, Swift concurrency UnsafeContinuation, Swift concurrency CheckedContinuation, Swift concurrency TaskLocal, Swift concurrency MainActor run, Swift concurrency detach Function, Swift concurrency Task.sleep, Swift concurrency Task.yield, Swift concurrency withTaskGroup, Swift concurrency withThrowingTaskGroup, Swift concurrency @MainActor, Swift concurrency @GlobalActor, Swift concurrency @Sendable closures, Swift concurrency @unchecked Sendable, Swift concurrency cancellation support, Swift concurrency async let bindings, Swift concurrency Distributed Actors (planned), Swift concurrency partial tasks, Swift concurrency structured concurrency repeated, Swift concurrency concurrency model proposals, Swift Linux support for Swift, Swift Windows support for Swift, Swift cross-compilation with SwiftPM, Swift Foundation Data Type, Swift Foundation URL Type, Swift Foundation Date Type, Swift Foundation Locale Type, Swift Foundation Calendar Type, Swift Foundation TimeZone Type, Swift Foundation Measurement Type, Swift Foundation NotificationCenter, Swift Foundation UserDefaults, Swift NSRegularExpression (via bridging), Swift bridging from NSString to String, Swift bridging from NSArray to [Any], Any], Swift bridging from NSSet to Set<AnyHashable>, Swift bridging from NSNumber to numeric types, Swift bridging from NSData to Data, Swift bridging from NSDate to Date, Swift bridging from NSUUID to UUID, Swift bridging from NSURL to URL, Swift bridging from NSError to Error, Swift bridging from CFType to Swift types, Swift bridging from CoreFoundation to Foundation, Swift generics syntax, Swift generic constraints, Swift generic where clauses, Swift generic associatedtype in protocols, Swift typealias in generics, Swift generic subscripts, Swift subscript keyword, Swift dynamic subscripts, Swift property subscript with keypaths, Swift subscripts for collections repeated, Swift iteration with for-in loop, Swift enumeration CaseIterable protocol, Swift Identifiable protocol repeated (SwiftUI), Swift CustomStringConvertible repeated, Swift CustomDebugStringConvertible repeated, Swift LosslessStringConvertible Protocol, Swift Strideable repeated, Swift Numeric protocol, Swift BinaryInteger protocol, Swift FixedWidthInteger protocol, Swift SignedInteger protocol, Swift UnsignedInteger protocol, Swift FloatingPoint protocol, Swift BinaryFloatingPoint protocol, Swift RandomNumberGenerator protocol, Swift DefaultRandomNumberGenerator, Swift gen random values (Int.random), Swift DateFormatter from Foundation, Swift ISO8601DateFormatter, Swift NumberFormatter, Swift MeasurementFormatter, Swift URLComponents, Swift URLRequest, Swift URLResponse, Swift HTTPURLResponse, Swift DataTask with URLSession, Swift DownloadTask with URLSession, Swift UploadTask with URLSession, Swift JSONSerialization (Foundation), Swift PropertyListSerialization, Swift JSONDecoder, Swift JSONEncoder, Swift PropertyListDecoder, Swift PropertyListEncoder, Swift custom Decoding/Encoding strategies, Swift KeyedDecodingContainer, Swift KeyedEncodingContainer, Swift UnkeyedDecodingContainer, Swift UnkeyedEncodingContainer, Swift SingleValueDecodingContainer, Swift SingleValueEncodingContainer, Swift throw DecodingError.dataCorrupted, Swift throw DecodingError.keyNotFound, Swift throw DecodingError.typeMismatch, Swift throw DecodingError.valueNotFound, Swift bridging with Objective-C classes, Swift @objc dynamic, Swift @objcMembers, Swift @objc optional protocol methods, Swift @convention(c) , Swift @convention(block), Swift @autoclosure repeated, selector syntax, keyPath syntax, fileID (Swift 5.3+), filePath (Swift 5.3+), fileLiteral ImageLiteral , colorLiteral ColorLiteral , imageLiteral ImageLiteral , fileLiteral ResourceLiteral, Swift @testable import, Swift Unit Testing with XCTest, Swift @testable for test targets, Swift XCTFail Function, Swift XCTAssertTrue, Swift XCTAssertFalse, Swift XCTAssertEqual, Swift XCTAssertNotEqual, Swift XCTAssertNil, Swift XCTAssertNotNil, Swift XCTAssertThrowsError, Swift XCTAssertNoThrow, Swift measure method in XCTest, Swift async test support in XCTest, Swift Performance Tests, Swift code coverage with Xcode, Swift Instrumentation with Instruments tool, Swift Playground Pages, Swift Playground markup documentation, Swift Documentation comments ///, Swift Markdown in comments, Swift quick help in Xcode, Swift symbol graph generation (swift symbolgraph-extract), Swift docc documentation compiler, Swift docc bundle, Swift docc renderers, Swift SwiftUI View protocol, Swift SwiftUI @State property wrapper repeated, Swift SwiftUI @ObservedObject property wrapper, Swift SwiftUI @Environment property wrapper repeated, Swift SwiftUI @EnvironmentObject property wrapper repeated, Swift SwiftUI @AppStorage repeated, Swift SwiftUI @SceneStorage repeated, Swift SwiftUI ViewBuilder (result builder), Swift SwiftUI body property, Swift SwiftUI Text, Swift SwiftUI Image, Swift SwiftUI Button, Swift SwiftUI List, Swift SwiftUI NavigationView, Swift SwiftUI NavigationLink, Swift SwiftUI ForEach, Swift SwiftUI VStack, Swift SwiftUI HStack, Swift SwiftUI ZStack, Swift SwiftUI Spacer, Swift SwiftUI Color, Swift SwiftUI Font, Swift SwiftUI modifier syntax, Swift SwiftUI state management, Swift SwiftUI onAppear, Swift SwiftUI onDisappear, Swift SwiftUI Task modifier, Swift SwiftUI async image loading, Swift SwiftUI Canvas view, Swift SwiftUI TimelineView, Swift SwiftUI Grid APIs (iOS16+), Swift SwiftUI Charts (added frameworks), Swift SwiftUI App Protocol, Swift SwiftUI Scene, Swift SwiftUI WindowGroup, Swift SwiftUI DocumentGroup, Swift SwiftUI Commands, Swift SwiftUI @MainActor in SwiftUI app, _), Swift Combine Publisher, Swift Combine Subscriber, Swift Combine Subject, Swift Combine PassthroughSubject, Swift Combine CurrentValueSubject, Swift Combine Just, Swift Combine Future, Swift Combine AnyPublisher, Swift Combine sink operator, ), Swift Combine map operator, Swift Combine flatMap operator, Swift Combine filter operator, Swift Combine debounce operator, Swift Combine throttle operator, Swift Combine removeDuplicates operator, Swift Combine merge operator, Swift Combine zip operator, Swift Combine combineLatest operator, Swift Combine switchToLatest operator, Swift Combine catch operator, Swift Combine retry operator, Swift Combine eraseToAnyPublisher operator, Swift Combine Published property wrapper, Swift Combine @Published repeated, Swift Combine ObservableObject protocol, Swift Combine @Published integration with SwiftUI, Swift Combine schedulers, Swift RunLoop scheduler, Swift DispatchQueue scheduler, Swift OperationQueue scheduler, Swift Foundation NotificationCenter publisher, Swift URLSession publisher, Swift Timer publisher, Swift KeyValueObservingPublisher, Swift @MainActor closures, Swift async Sequence, Swift async await sequences, Swift unsafe concurrency code (not recommended), Swift package plugins, Swift .target in Package.swift repeated, Swift .testTarget in Package.swift, Swift resources in SwiftPM, Swift binaryTarget in Package.swift, Swift Xcode integration with SwiftPM, Swift REPL in swift command line, Swift distributed actor (proposal for concurrency), Swift typed throws (proposal), Swift incremental compilation, Swift module interface, Swift module stability, Swift ABI stability, Swift back-deployment, Swift @_exported Import repeated, Swift @_implementationOnly Import repeated, Swift static linking vs dynamic linking in Swift, Swift bridging Objective-C generics, Swift bridging Objective-C nullability (nullable/nonnull), Swift CFTypeRef bridging, Swift Core Foundation bridging , /Code/ blocks, /Callout/, /Image/, /Link/, Swift concurrency actor isolation, Swift concurrency global actors, Swift concurrency strict checking, Swift concurrency sendable closures, Swift concurrency nonisolated keyword, Swift concurrency MainActor global, Swift concurrency TaskGroup repeated, Swift concurrency Task.detached, Swift concurrency Task.sleep repeated, Swift concurrency Task.cancel(), Swift concurrency cancellation tokens (not official yet), Swift concurrency throwing tasks, Swift concurrency asyncSequence yield, Swift concurrency withThrowingTaskGroup repeated, Swift concurrency partial tasks repeated, Swift concurrency distributed actors repeated proposal, Swift concurrency infinite loops with async tasks (avoid), Swift concurrency priority inheritance, Swift concurrency TaskLocal values, Swift concurrency partial async functions proposal, Swift concurrency runDetached function (hypothetical), Swift concurrency structured concurrency model repeated, Swift concurrency safe data structures, Swift concurrency re-entrancy in actors, Swift concurrency actor sendable checking, Swift concurrency distributed ActorSystem protocol, Swift concurrency distributed method calls, Swift concurrency location transparency with distributed actors, Swift concurrency partial application of async functions, CheckedContinuation repeated, Swift concurrency withUnsafeContinuation repeated, Swift concurrency no more block-based async APIs (goal), Swift concurrency bridging with GCD, Swift concurrency bridging with NSOperationQueue, Swift concurrency bridging with RunLoop, Swift concurrency bridging with CFRunLoop, Swift concurrency concurrency and URLSession extensions (async/await APIs), Swift concurrency async let repeated to define child tasks, Swift concurrency cancellation checking with Task.isCancelled, Swift concurrency partial tasks not visible to user, Swift concurrency unstructured concurrency with Task.init, Swift concurrency main actor run Task, Swift concurrency @MainActor on class/struct, Swift concurrency @MainActor function, Swift concurrency main-actor-isolation for UI code.

Swift: Swift Fundamentals, Swift Inventor - Swift Language Designer: Chris Lattner, Doug Gregor, John McCall, Ted Kremenek, Joe Groff of Apple Inc. on June 2, 2014; SwiftUI, Apple Development Kits - Apple SDKs (CloudKit, CoreML-ARKit - SiriKit - HomeKit, Foundation Kit - UIKit - AppKit, SpriteKit), Swift Keywords, Swift Built-In Data Types, Swift Data Structures (Swift NSString String Library, Swift NSArray, Swift NSDictionary, Swift Collection Classes) - Swift Algorithms, Swift Syntax, Swift Access Control, Swift Option Types (Swift Optionals and Swift Optional Chaining), Swift Protocol-Oriented Programming, Swift Value Types, Swift ARC (Swift Automatic Reference Counting), Swift OOP - Swift Design Patterns, Clean Swift - Human Interface Guidelines, Swift Best Practices - Swift BDD, Swift Apple Pay, Swift on iOS - Swift on iPadOS - Swift on WatchOS - Swift on AppleTV - Swift on tvOS, Swift on macOS, Swift on Windows, Swift on Linux, Swift installation, Swift Combine framework (SwiftUI framework - SwiftUI, UIKit framework - UIKit, AppKit framework - AppKit, Cocoa framework - Cocoa API (Foundation Kit framework, Application Kit framework, and Core Data framework (Core Data object graph and Core Data persistence framework, Core Data object-relational mapping, Core Data ORM, Core Data SQLite), Apple Combine asynchronous events, Apple Combine event-processing operators, Apple Combine Publisher protocol, Apple Combine Subscriber protocol), Swift containerization, Swift configuration, Swift compiler, Swift IDEs (Apple Xcode (Interface Builder, nib files), JetBrains AppCode), Swift development tools (CocoaPods dependency manager, Swift Package Manager, Swift debugging), Swift DevOps (Swift scripting, Swift command line, Swift observability, Swift logging, Swift monitoring, Swift deployment) - Swift SRE, Swift data science (Core Data, Realm-RealmSwift, Swift SQLite, Swift MongoDB, Swift PostgreSQL), Swift machine learning (Core ML), Swift AR (ARKit), SiriKit, Swift deep learning, Swift IoT (HomeKit), Functional Swift (Swift closures (lambdas - effectively “Swift lambdas”), Swift anonymous functions), Swift concurrency (Apple Combine framework, Swift actors, Swift async, Swift async/await, Grand Central Dispatch (GCD or libdispatch), Swift on multi-core processors, Swift on symmetric multiprocessing systems, Swift task parallelism, Swift thread pool pattern, Swift parallelism), Reactive Swift (RXSwift), Swift testing (XCTest framework, Swift TDD, Swift mocking), Swift security (Swift Keychain, Swift secrets management, Swift OAuth, Swift encryption), Swift server-side - Swift web (Swift Vapor, Swift Kitura), Swift history, Swift bibliography, Manning Swift Series, Swift Glossary - Glossaire de Swift - French, Swift topics, Swift courses, Swift Standard Library (Swift REST, Swift JSON, Swift GraphQL), Swift libraries, Swift frameworks (Apple Combine framework, SwiftUI), Swift research, WWDC, Apple GitHub - Swift GitHub, Written in Swift, Swift popularity, Swift Awesome list, Swift Versions, Objective-C. (navbar_swift - see also navbar_iphone, navbar_ios, navbar_ipad, navbar_mobile)


Cloud Monk is Retired ( for now). Buddha with you. © 2025 and Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


swift_in_depth_table_of_contents.txt · Last modified: 2025/02/01 06:26 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki