#swift

Found 97 articles tagged with #swift

A Comprehensive Comparison of Swift and Objective-C

Swift and Objective-C are two programming languages used for developing iOS, macOS, and watchOS applications. Objective-C has been the….

Swift Advanced Custom Pattern Matching

When you use pattern matching in Swift, the compiler uses the `~=` operator behind the scenes to match the value against each case pattern.

Mar 17, 2023#patterns#swift

A Beginner Guide to Pattern Matching in Swift

In Swift, pattern matching is a powerful feature that can be used to match values against a set of patterns, including ranges, optionals….

Mar 17, 2023#patterns#swift

Swift Platform Compilation Conditions

Swift compiler supports platform compilation conditions on whether to build certain parts of the code. Unlike regular and which execute at….

Mar 13, 2023#swift#compiler

Swift @main Entry Points

Learning different attributes like @main, @UIApplicationMain, or @NSApplicationMain for designating a type as the entry point for beginning program execution.

Mar 12, 2023#swift

Swift Sendable protocol and @Sendable attribute

We need a way to differentiate between the cases that are safe to transfer between concurrency domains and those that are not.

Mar 11, 2023#swift#concurrency

In-App Purchases with StoreKit 2 — A Complete Guide

How to implement in-app purchases and subscriptions with StoreKit 2 using Swift and SwiftUI, covering Product API, transactions, entitlement checks, SwiftUI store views, StoreKit Testing, and receipt validation.

Swift Continuations

Asynchronous tasks can suspend themselves on continuations which synchronous code can then capture and invoke to resume the task in response to an event.

Mar 10, 2023#swift#concurrency

Swift Async Sequences

The new AsyncSequence protocol enables a natural, simple syntax for iterating over a sequence of values over time as easy as writing a `for` loop.

Mar 08, 2023#swift#concurrency

iOS Modal Presentations

You display a modal presentation, like an alert, popover, sheet, or confirmation dialog to draw attention to an important narrowly scoped task.

Mar 07, 2023#ios#swift#swiftui