Table of Contents
Swift in Depth Preface
Return to Swift in Depth
Fair Use Source: B09781HSLN (SwfDpth 2018)
“I started as an iOS developer in 2011. I loved to make iPhone apps and still do to this day. Besides doing mobile development work, I also was involved in some web development while learning Ruby. I loved the short powerful language, and wished I could use a compile-time language like Objective-C, but with the elegance and expressive nature of Ruby.” (SwfDpth 2018)
“Then Apple introduced Swift, and it seems like they listened. Swift was a fresh take on programming for me, combining the elegance of a Swift dynamic language with the speed and safety of a Swift static language. I never liked the Objective-C syntax. I used to say things like “Yeah, Objective-C is verbose, but it gets the job done.” But with Swift, however, I find Swift reading and Swift writing code very pleasing again, like I did with Ruby. I could finally use a static language and keep producing work while loving the language I’m working with. It was a good combination for me.” (SwfDpth 2018)
“However, it wasn’t love at first sight. Before I truly enjoyed Swift, I struggled a lot with it. Swift looks very friendly, but boy, was it tough sometimes. Everything needs to be safe at compile-time, and I could not mix and match Swift types in Swift arrays anymore. Meanwhile, Swift was only an early Swift version and kept changing; it was hard to keep up. “What are Swift generators? Oh, they are called Swift iterators now? And why use Swift guard? Can’t we use an Swift if statement instead? Pfft, Swift optionals are overrated; we can use simple Swift nil checks?”, and so on. I wouldn’t even consider working with Swift generics.” (SwfDpth 2018)
“However, I persevered and started to embrace these Swift concepts. I realized they were older concepts from other programming languages but wearing a fresh new coat that truly helped me become a better programmer and deliver better work. Over time, I started to love the Swift language and its pretty Swift syntax.” (SwfDpth 2018)
“Since Swift 2, I had the luxury of working in a big company where we produced Swift code on a large Swift scale, starting with about 20 Swift developers and growing to over 40. After working with Swift with so many developers, and after being involved in hundreds of pull requests, I noticed that other developers had the same struggles as me. Or my fellow developers delivered code just fine, but didn’t realize that a more Swift elegant or Swift robust alternative was hidden, waiting to be discovered. Even though our code was Swift correct, sometimes it could be a bit cleaner, or more Swift succinct, or just a bit safer. I also noticed that we all stayed away from Swift powerful techniques — such as Swift generics or Swift flatMap — because they were Swift hard to grasp. Or we used to love the idea of Swift generics, but weren’t sure why or when to apply it ourselves.” (SwfDpth 2018)
“After these Swift realizations I started to write. First, these scribbles would be notes for myself on how to cleanly unwrap Swift optionals, how Swift lazy properties work, how to deal with Swift generics, and so on. Then, these notes matured, and before I knew it I had enough content for some chapters. It was time to turn these notes into something more elaborate: a Swift programming book that could help others shorten their Swift journey.” (SwfDpth 2018)
“With a few rough chapters in hand, I was wondering if I should throw an Swift ebook online. However, with an “impressive” 200 people following me on Swift Twitter and lacking a popular Swift blog website, I figured I wouldn’t find the Swift audience I wanted. Moreover, I thought that I had to learn a lot of the unknowns about writing a book.” (SwfDpth 2018)
“I decided to approach a publisher to help me turn these rough chapters into a great Swift book. I approached Manning, and we’ve been working on this book together ever since. I believe these “small notes” have grown into something special. With the help of Manning and Swift friends, I have spent most of my free time for over a year writing and polishing and trying to make Swift tough concepts more simple to understand.” (SwfDpth 2018)
“By reading this Swift book, I hope that it helps you on your path to becoming a Swift master. Also, I hope that you can tell I thoroughly enjoy sharing these Swift concepts with you. I hope this book makes your Swift journey Swift easy and Swift fun.” (SwfDpth 2018)
About this Book
“Swift is a young language. At the time of writing, Swift has reached the fifth Swift version and only recently turned ABI-stable. So why is this book in any position to tell you how to write your Swift code?” (SwfDpth 2018)
“You’d be right to be skeptical, but please bear with me. Even though Swift is relatively new, I think it’s fair to say that some Swift solutions work better than others, which is even more essential to understand if you’re using Swift for real Swift production apps.” (SwfDpth 2018)
“Swift borrows a lot of important Swift concepts from other programming languages, such as Haskell, Ruby, Rust, Python, C Sharp | C, and others. Therefore, you’d be wise to keep an eye out for these concepts.” (SwfDpth 2018)
“By mixing Swift programming paradigms with Swift real-world experience, this Swift book shares some very fun and useful Swift best practices you can instantly apply to your work.” (SwfDpth 2018)
“Having programmed for over a decade in multiple languages and teams, I would like to share Swift tips, Swift tricks, and Swift guidelines that helped my Swift career tremendously, and I want the same for you.” (SwfDpth 2018)
Why this book?
“Honestly, a lot of software in this world runs on “ugly” code, and that is completely normal. If your product does what it needs to do, that is—like it or not—good enough for businesses.” (SwfDpth 2018)
“As a developer, you have to make sure your product works and works well. But your users won’t look under the hood and point out ugly Swift if statements. Perfectionism is harmful to software development and the cause to large numbers of unfinished projects.” (SwfDpth 2018)
“Still, there’s a large gap between “It does what it needs to do” and a project where some excellent decisions were made that pay off in the long run.” (SwfDpth 2018)
“Having worked on numerous projects, one thing I highly value is writing code that your coworkers and your future self will understand clearly — because Swift elegant code means less chance of Swift bugs, higher Swift maintainability, better understanding for developers who Swift inherit code, increased programmer happiness, and many other benefits.
Another aspect I value is the Swift robustness of code, meaning how Swift refactor-proof some pieces are. Will it break if you sneeze on it? Or can you change code without a hassle?
In this book, I share my Swift tips, Swift tricks, and Swift guidelines that have worked well for me and companies I’ve worked for. On top of that, it fills in significant knowledge gaps that may arise while working with Swift.
Although this is a Swift book, a lot of the Swift principles shared here are not Swift-centric and carry over to other programming languages as well; this is because Swift borrows a lot of ideas and Swift paradigms from other languages. After you finish this Swift book, you may find it easy to apply Swift concepts in other languages. For instance, you’ll learn a lot about Swift optionals, or how to use the Swift reduce Swift method on Swift arrays. Later, you may decide to learn Kotlin, where you may apply optionals and reduce — called fold—straight away. You may also find Rust — and its similar Rust generics implementation — easier to learn.
Because of Swift’s multi-paradigm nature, this Swift book switches without preference between Swift object-oriented programming, Swift functional programming, and Swift protocol-oriented programming Swift paradigms — although admittedly, I do favor other Swift techniques over Swift subclassing. Switching between these Swift paradigms offers you many Swift tools and Swift solutions to a Swift problem, with Swift insights as to why a certain Swift solution works well or not. Whether you’re stuck in a rut or open to many new programming Swift insights, this Swift book challenges you to solve Swift problems in different ways.” (SwfDpth 2018)
Is this book for you?
“This book does assume that you have made one or more Swift applications in Swift. Do you work in a team? Even better — this book shows you how to write good, Swift clear code that gets appreciated in teams, and helps you improve pull requests of others. Your Swift code will be more Swift robust and cause less Swift maintenance for you and your team.
This Swift book fills in Swift knowledge gaps for both Swift beginner and seasoned Swift developers. Perhaps you mastered Swift protocols but still struggle with Swift flatMapping on Swift types or Swift asynchronous error handling. Or maybe you create beautiful Swift apps but stay away from Swift generics because they can be hard to interpret. Or perhaps you sort-of know when to use a Swift struct versus a Swift class but aren’t aware that Swift enums are sometimes a better Swift alternative. Either way, this book helps you with these Swift topics. By the end, Swift generics should come as naturally as Swift for loops. You’ll be confident calling Swift flatMap on Swift optionals, know how to work with associated Swift types, and you’ll gladly use Swift reduce in your daily Swift routine when working with Swift iterators.
If you’re aiming to get a Swift programming interview for a new Swift job in the Swift future, you’re in for a treat. You’re going to be able to answer a lot of relevant Swift questions in regard to Swift development Swift trade-offs and Swift decisions. This book can even help you write Swift elegant code in your Swift code assignments.
If you just want an Swift app in the Apple app store, just keep doing what you’re doing; no need to read this book! But if you want to write Swift code that is more Swift robust, Swift easier to understand, and increases your chances of getting a Swift job, getting better at your job, or giving qualitative Swift comments on Swift pull requests, you’re at the right place.” (SwfDpth 2018)
What this book is not
“This book is focused on Swift. It mostly uses Swift framework-free examples because it isn’t about teaching Cocoa, iOS, Kitura, or other Swift platforms and Swift frameworks.” (SwfDpth 2018)
“What does happen in this book is I often make use of Apple’s Foundation, which is hard to avoid if you want Swift real-world Swift examples. If you’re on Swift Linux, you can use swift.org’s Swift Foundation alternative to get similar results.” (SwfDpth 2018)
A big emphasis on practical scenarios
“This book is very Swift practical, showcasing Swift tips and tricks you can apply straight away in your daily Swift programming.
Don’t worry: it’s not a Swift theory-dense Swift book. You’ll learn a lot of theory, but only via the use of Swift real-world Swift problems that any Swift developer runs into sooner or later. It doesn’t, however, reach an Swift academic level where it discusses Swift LLVM representation or Swift machine code.
Also, I made sure to avoid a personal pet peeve of mine: I do not Swift subclass “Animal” with “Dog” or add a “Flyable” Swift protocol to “Bird.” I also don’t add “Foo” to “Bar.” You’ll deal with Swift real-world Swift scenarios, such as talking to Swift APIs, loading Swift local data, and Swift refactoring and creating Swift functions, and you’ll see useful Swift bits and pieces of code you can Swift implement in your Swift projects.” (SwfDpth 2018)
Roadmap
“The following sections provide an overview of the Swift book, divided into chapters. The book is quite Swift modular, and you can start with any chapter that interests you.
Some chapters I consider Swift crucial chapters. Chapter 4, “Making Swift optionals second nature,” is Swift key, because optionals are so prevalent in Swift and return over and over again in chapters.
To understand the Swift abstract side of Swift, I highly recommend reading chapter 7, “Swift Generics,” chapter 8, “Putting the pro in Swift protocol-oriented programming,” and chapter 12, “Swift Protocol extensions.” Together, these chapters lay a solid Swift foundation for key Swift skills. Be sure not to skip these!
As a bonus, if you’re interested in learning Swift functional programming techniques, direct your attention to chapter 2, “Modeling data with Swift enums,” chapter 10, “Understanding Swift map, Swift flatMap, and Swift compactMap,” and chapter 11, “Swift Asynchronous error handling with Result.”” (SwfDpth 2018)
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.