Skip to content
iPhone camera view showing the default physical camera button behavior
December 18, 2024

Support the iPhone Camera Control button in your own iOS app

SwiftUI, zoom, exposure, and custom control examples for handling the iPhone Camera Control button inside your own app.

SwiftUIAVFoundationAVKit
Animated demonstration of a SwiftUI app with a custom tab bar and swipeable sidebar
December 9, 2024

Build a Twitter-style custom tab bar and sidebar in SwiftUI

Use TabView, ZStack, AsyncImage, GeometryReader, and drag state to build a custom tab bar and swipeable sidebar in SwiftUI.

SwiftUITabViewSidebar
Overview image for using Apple's Translation framework inside an app
December 5, 2024

Use Apple's iOS 18 Translation framework inside your app

SwiftUI and UIKit patterns for Apple's Translation framework, including built-in UI, availability checks, model downloads, and programmatic translation.

SwiftUIUIKitTranslation
Xcode warning showing that .tabItem is being deprecated in future iOS versions
October 9, 2024

Replace deprecated SwiftUI .tabItem with the new Tab API

Use the new Tab initializer inside TabView, then add selection values and badges without relying on the old .tabItem modifier.

SwiftUITabViewiOS 18.1
visionOS app demo showing a 2D window, immersive 3D content, and model inspection workflows
August 22, 2024

Build a native visionOS app with immersive spaces and tappable 3D objects

Use SwiftUI, RealityKit, ImmersiveSpace, WindowGroup, and Reality Composer Pro to build a simple visionOS mini-game.

SwiftUIRealityKitvisionOS
WWDC 2024 keynote slide introducing visionOS 2
June 10, 2024Updated June 13, 2024

WWDC 2024 keynote recap: visionOS 2, iOS 18, Apple Intelligence, and more

Apple's WWDC 2024 keynote, from visionOS 2 and iOS 18 to Apple Intelligence and macOS Sequoia.

WWDC 2024iOS 18visionOS 2
A cat photo shown beside the generated foreground mask for its detected subjects
May 29, 2024Updated June 1, 2024

Extract objects from images on iOS with ImageAnalysisInteraction and VNGenerateForegroundInstanceMask

Use Apple's high-level image interaction APIs for Photos-style subject lifting, then drop to Vision when you need the actual mask.

iOSSwiftSwiftUI
App Store submission email showing the ITMS-91053 missing API declaration warning
March 17, 2024

Fix ITMS-91053 by adding required-reason API declarations to your privacy manifest

Create PrivacyInfo.xcprivacy, attach it to the right targets, add required-reason API entries, and fill out data collection details correctly.

XcodeApp StorePrivacy Manifest
Xcode screenshot showing custom Swift macros catching invalid URLs and invalid SF Symbols during compilation
October 5, 2023Updated October 6, 2023

Create custom Swift macros for URL validation, SF Symbols, and iCloud key-value storage

Build Swift macros that validate inputs at compile time, generate accessors, and emit better diagnostics.

SwiftSwift MacroSwiftSyntax
Inline TipKit hint pointing at an action button
September 4, 2023Updated September 23, 2023

Show in-app hints with TipKit in SwiftUI on iOS 17

Define Tip objects, show inline and popover hints, gate them with rules, and debug TipKit behavior in SwiftUI.

SwiftUITipKitiOS 17
SwiftUI example showing scroll position control inside a horizontal card carousel
June 16, 2023Updated October 6, 2023

19 useful SwiftUI additions in iOS 17: a practical WWDC 2023 roundup

Practical SwiftUI and related iOS 17 features shown around WWDC 2023.

SwiftUIiOS 17WWDC 2023
Apple Vision Pro shown during the WWDC 2023 keynote
June 5, 2023Updated June 7, 2023

WWDC 2023 keynote recap: Vision Pro, iOS 17, macOS Sonoma, and more

Apple's WWDC 2023 keynote, from Vision Pro and new Mac hardware to iOS 17, iPadOS, macOS Sonoma, and the rest of the platform sweep.

WWDC 2023Vision ProiOS 17
Animated semicircular progress ring built with SwiftUI
May 25, 2023

Create a half circular progress ring in SwiftUI

Trim a circle, rotate it into place, animate the value, and build a semicircular progress ring in SwiftUI.

SwiftUIProgress RingAnimation
Chatbot output after 10,000 training iterations using a small dataset of 88 Qiita posts
April 15, 2023

Train a small GPT-style chatbot from your own Qiita posts with nanoGPT

Use nanoGPT, a Japanese tokenizer, and your own text corpus to train a tiny chatbot from scratch and inspect how the output improves over time.

PythonnanoGPTJapanese NLP
SwiftUI app showing a LINE login button and profile result after sign in
March 24, 2023

Add LINE Login to a SwiftUI app and read the user profile with onOpenURL

Register the LINE channel, add LineSDK, wire the callback through onOpenURL, and bridge the LINE login button into SwiftUI.

SwiftUILINE LoginLineSDK
Demo of a camera scanner drawing a green highlight around a detected QR code
December 25, 2022

Detect QR codes from the camera, highlight them, and bridge the scanner into SwiftUI

Use AVCaptureMetadataOutput to scan QR codes, draw an overlay around the detected code, and expose the scanner as a SwiftUI-compatible view.

SwiftUIAVFoundationQR Code
Stable Diffusion image generated from a spring landscape text prompt on Apple platforms
December 20, 2022Updated April 17, 2023

Run Stable Diffusion with Core ML on iOS and macOS

Convert Stable Diffusion models for Apple platforms, load the compiled resources in Swift, and understand the practical limits on iPhone, iPad, and Mac.

Stable DiffusionCore MLSwift
iPhone screenshot showing a bright QR code rendered with EDR while a normal QR image lower on the screen stays dim
November 11, 2022Updated November 19, 2022

Highlight only a QR code on iPhone with EDR rendering, Metal, and SwiftUI

Use Extended Dynamic Range rendering, Core Image, MetalKit, and SwiftUI to make only the QR region brighter instead of blasting the whole display.

iOSMetalSwiftUI
A UICollectionView list styled with SwiftUI-powered row content
September 29, 2022Updated December 13, 2022

Use SwiftUI views inside UICollectionView and UITableView with UIHostingConfiguration

Bridge SwiftUI into UIKit list UIs with UIHostingConfiguration, CellRegistration, supplementary registrations, and a small amount of observation-friendly model work.

iOS 16UIKitSwiftUI
Dynamic Island compact Live Activity example on iPhone 14 Pro
September 16, 2022Updated November 19, 2022

Build Live Activities and Dynamic Island interfaces with ActivityKit on iPhone 14 Pro

A practical ActivityKit walkthrough covering Live Activities on the lock screen and Dynamic Island, including attributes, widget configuration, launch, updates, and ending the activity.

iOSActivityKitWidgetKit
iPhone screen showing iOS 16 MapKit place picking directly from the map
August 19, 2022Updated November 19, 2022

Use iOS 16 MapKit for map feature selection, Look Around, and search completion

A practical MapKit walkthrough for place picking, MKMapFeatureAnnotation callouts, Look Around snapshots, embedded street view, and search suggestions.

iOSMapKitSwift
SwiftUI list showing Core Data items grouped into date-based sections
August 10, 2022Updated November 19, 2022

Group Core Data entries by date or category with SectionedFetchRequest

A practical SwiftUI guide to SectionedFetchRequest, grouping keys, section identifiers, and rendering grouped Core Data results.

iOSCore DataSwiftUI
SwiftUI screen where private account data is hidden until biometric authorization succeeds
July 19, 2022Updated November 19, 2022

Store secrets with LARight and gate private UI with Face ID on iOS 16

A practical LARight walkthrough for storing secrets, reauthorizing access, sharing biometric state across SwiftUI views, and hiding private data with redaction.

iOS 16SwiftSwiftUI
Runtime diagram showing a foreground app scheduling a background refresh task and later resuming for a URLSession response
June 23, 2022Updated November 19, 2022

Run background refresh tasks and background URLSession work from SwiftUI

A practical SwiftUI guide to BackgroundTasks, scheduling refresh work, background URLSession downloads, and compatibility fallbacks.

SwiftUIiOS 16BackgroundTasks
iPhone screen showing live text recognition from the camera with selectable text highlighted
June 20, 2022Updated November 19, 2022

Use VisionKit on iOS 16 for live text scanning and image text selection

A practical VisionKit guide to DataScannerViewController, recognized data types, delegate callbacks, ImageAnalyzer, and ImageAnalysisInteraction.

iOS 16VisionKitSwift
SwiftUI Gauge examples from the iOS 16 era showing range-based progress styles
June 14, 2022Updated December 5, 2022

26 useful SwiftUI additions in iOS 16: a practical WWDC 2022 roundup

Practical SwiftUI additions from WWDC 2022, grouped into views, navigation, integrations, workflow improvements, and utility APIs.

SwiftUIiOS 16WWDC 2022
Overview image showing common chart types available in the Swift Charts framework
June 9, 2022Updated November 19, 2022

Build charts in SwiftUI with the Charts framework on iOS 16

A practical Swift Charts walkthrough covering the data model, Chart container, mark types, multiple datasets, RuleMark, and AreaMark.

SwiftUIChartsiOS 16
WeatherKit demo app showing current weather and forecast information inside an iOS interface
June 8, 2022Updated September 29, 2022

Fetch weather data with WeatherKit on iOS 16

A practical WeatherKit walkthrough covering entitlements, WeatherService, formatted weather values, forecasts, attribution, and the REST API.

iOS 16WeatherKitSwiftUI
iPhone lock screen showing Live Activities during the WWDC 2022 keynote
June 7, 2022Updated September 29, 2022

WWDC 2022 keynote recap: iOS 16, macOS Ventura, iPadOS 16, and new frameworks

Apple's WWDC 2022 keynote, from the iOS 16 lock screen and Live Activities to Stage Manager, WeatherKit, Swift Charts, RoomPlan, and the M2 Mac refresh.

WWDC 2022iOS 16macOS Ventura
Animated firework particle effect built in SwiftUI
April 29, 2022

Create a firework particle effect in SwiftUI

Analyze the motion, move one particle with sin and cos, scale it up to many particles, and build a simple firework effect in SwiftUI.

SwiftUIAnimationGeometryEffect
SwiftUI Text rendering bold, italic, link, and code markdown
April 9, 2022

Display markdown text in a SwiftUI app

Use markdown directly in a Text string, parse saved content with AttributedString(markdown:), and build a simple live markdown editor in SwiftUI.

SwiftUIMarkdownAttributedString
macOS menu bar app demo showing drag and drop into a SwiftUI popover
March 24, 2022

Build a SwiftUI macOS menu bar app with drag and drop

Use NSApplicationDelegateAdaptor inside a SwiftUI app, create a status bar popover, accept dropped URLs, and propagate them back into SwiftUI with ObservableObject.

macOSSwiftUIMenu Bar
Monthly SwiftUI calendar view built with LazyVGrid
March 2, 2022Updated April 21, 2022

Build a SwiftUI calendar view with LazyVGrid

Use a 7-column LazyVGrid, generate the visible range for a month, and keep the calendar aligned by hiding overflow days.

SwiftUICalendarLazyVGrid
System interface for starting a FaceTime call from a SharePlay-enabled app
February 18, 2022

SharePlay updates in iOS 15.4

Start a FaceTime call from your app, control the SharePlay share sheet option, manage session lifecycle, and present system notices.

iOS 15.4SharePlayGroupActivities
Search bar showing category tokens inside an iOS search field
January 31, 2022

Add UISearchToken tags to an iOS search view

Create UISearchToken values, assign them to a UISearchController, and bridge that search UI into SwiftUI with UIViewControllerRepresentable.

UISearchTokenUIKitSwiftUI
Apple Developer account screen showing the MusicKit capability enabled for an app identifier
January 25, 2022

Search and play Apple Music in an iOS app with MusicKit

Enable MusicKit, check subscription state, search Apple Music, request albums, and play them with the system or in-app player.

MusicKitApple MusicSwiftUI
SwiftUI app switching between follow system, dark mode, and light mode
January 14, 2022

Add a dark mode preference to a SwiftUI app

Store a user-selected appearance mode with AppStorage, expose it through a Picker, and apply it through preferredColorScheme.

SwiftUIDark ModeAppStorage
SwiftUI searchable demo showing a list and search interface
December 31, 2021

Add search and search suggestions to a SwiftUI app with .searchable

Use SwiftUI's searchable modifier, bind it to state, filter list results, and show suggestion rows with searchCompletion.

SwiftUI.searchableSearch Suggestions
Flow diagram for hosting a SharePlay session
December 4, 2021Updated August 21, 2022

Add SharePlay data sharing to an iOS 15 app

Enable the Group Activities capability, define a GroupActivity type, watch sessions, configure GroupSessionMessenger, and send data between FaceTime participants.

SharePlayGroup ActivitiesGroupSessionMessenger
Code-themed illustration of TimelineView periodically updating a SwiftUI interface
November 26, 2021Updated November 30, 2021

Periodically reload a SwiftUI view on iOS 15 with TimelineView

Use TimelineView(.periodic) to schedule redraws, read the current date from the timeline context, and turn time into a lightweight SwiftUI loading animation.

SwiftUITimelineViewiOS 15
Xcode showing localizable strings in a SwiftUI project
November 20, 2021

Localize a Swift project in Xcode 13

Prepare the project languages, mark strings correctly, turn on compiler extraction, export localizations, edit xcloc files, and import the translated result back into Xcode 13.

Xcode 13LocalizationSwiftUI
Custom palette colors applied to layered SF Symbols
October 23, 2021

Customize SF Symbols in SwiftUI and UIKit

Use Image(systemName:), UIImage.SymbolConfiguration, hierarchical rendering, multicolor rendering, and palette colors to control SF Symbols in SwiftUI and UIKit.

SF SymbolsSwiftUIUIKit
Xcode Build Settings showing Alternate App Icon Sets
October 13, 2021Updated October 14, 2021

Add Alternate App Icons in Xcode 13

Set up alternate app icons in Xcode 13 with asset catalogs, Alternate App Icon Sets, and UIApplication.shared.setAlternateIconName.

Xcode 13iOSApp Icons
A chat-style iOS notification showing an avatar next to the sender
September 29, 2021Updated June 5, 2024

Show Chat Avatars in iOS Notifications with Siri Intents

Use Communication Notifications, INPerson, INSendMessageIntent, and a notification service extension to make chat notifications feel more like Messages.

iOS 15Siri IntentsNotifications
Diagram showing microphone audio flowing into ShazamKit, then either Apple's music catalog or a custom sound catalog
September 19, 2021Updated October 12, 2021

Use ShazamKit for Online Music Recognition and Custom Sound Catalogs

Set up SHSession, stream microphone audio with AVAudioEngine, handle SHSessionDelegate callbacks, build a custom .shazamcatalog, and recognize your own sounds with ShazamKit.

ShazamKitiOS 15AVAudioEngine
Apple DocC overview artwork used in this article introduction
August 25, 2021Updated October 12, 2021

Generate and Publish Framework Docs with Xcode 13 DocC

Create a DocC catalog, write symbol comments, build documentation in Xcode 13, customize the landing page, export .doccarchive, and host the result with nginx.

DocCXcode 13Swift
Diagram highlighting lightweight iOS 15 SwiftUI additions such as Task, AsyncImage, searchable, refreshable, markdown, and tab badges
August 4, 2021Updated October 12, 2021

New iOS 15 SwiftUI Features You Can Use in Just a Few Lines

A compact iOS 15 SwiftUI roundup: Task, LocationButton, AsyncImage, searchable and refreshable lists, markdown text, FocusState, onSubmit, badges, and time-sensitive notifications.

SwiftUIiOS 15WWDC 2021
Illustration summarizing WWDC 2021 topics such as Xcode Cloud, SharePlay, Live Text, Universal Control, and Focus
June 7, 2021Updated October 12, 2021

WWDC 2021 keynote recap: iOS 15, Monterey, SharePlay, and new developer frameworks

Apple's WWDC 2021 keynote, from SharePlay and Focus to Monterey, Universal Control, Xcode Cloud, Live Text, and more.

WWDC 2021iOS 15macOS Monterey
Xcode renaming a variable through the refactor menu
May 14, 2021Updated October 12, 2021

15 Xcode tips for cleaner, better-structured code

Rename symbols safely, extract methods and variables, wrap strings for localization, generate initializers, save snippets, inspect history, and move around Xcode faster.

XcodeRefactoringSwift
iPad shortcut discovery overlay shown after holding the Command key
February 19, 2021Updated October 12, 2021

Add keyboard shortcuts to an iOS app with SwiftUI and UIKit

Use keyboardShortcut in SwiftUI, override keyCommands in UIKit, and let iPad users discover your app's shortcuts by holding Command.

iOSiPadOSSwiftUI
Xcode capability screen showing the iCloud container configuration for a Core Data and CloudKit app
January 30, 2021

Core Data and CloudKit: 9 setup tips and a debugging guide

A practical checklist for NSPersistentCloudKitContainer projects: capability setup, database environments, merge policy, dashboard verification, schema deployment, and debug flags.

iOSCore DataCloudKit
Illustration of a SwiftUI powered macOS menu bar app opening a popover
January 22, 2021Updated January 25, 2021

Build a macOS menu bar app with SwiftUI

A practical walkthrough for creating a SwiftUI powered macOS menu bar app with AppDelegate setup, a status item, a popover, and LSUIElement.

macOSSwiftUIMenu Bar
SwiftUI password field demo with live validation indicators
January 16, 2021Updated January 25, 2021

Use Combine with a SwiftUI TextField to react to text changes

A practical SwiftUI pattern for observing TextField updates with Just, enforcing input length, and driving password validation state.

SwiftUICombineTextField
Siri suggesting that a restaurant reservation be added to Calendar
January 5, 2021Updated January 25, 2021

Share reservation details with Siri using INRestaurantReservation

A practical iOS guide to donating reservation data with Intents, prompting calendar additions, updating existing reservation events, and handling Siri launch callbacks.

iOSSwiftSiri
Apple Maps displayed in a web page with a custom annotation card
December 14, 2020Updated January 26, 2021

Add Apple Maps to a web page with MapKit JS

A practical MapKit JS setup guide covering Maps IDs, token generation, the basic HTML embed, annotation pins, and key rotation.

HTMLJavaScriptMapKit JS
Overview of the Vapor contact form flow with GitHub sign-in and CAPTCHA
December 2, 2020Updated January 26, 2021

Build a Swift Vapor contact form with GitHub sign-in, CAPTCHA, and Ubuntu plus Nginx deployment

Use Vapor and Leaf to build a contact form that signs in with GitHub, verifies users with hCaptcha, sends mail through Mailgun, and deploys cleanly to Ubuntu with Nginx.

SwiftVaporGitHub OAuth
Custom SwiftUI components displayed inside the Xcode library
December 1, 2020Updated January 26, 2021

Add custom SwiftUI views and modifiers to the Xcode library

Open the Xcode SwiftUI library, browse built-in views and modifiers, then register your own reusable SwiftUI components with LibraryContentProvider.

XcodeSwiftUILibraryContentProvider
Diagram comparing eager loading in VStack with lazy loading in LazyVStack and List
November 25, 2020Updated January 26, 2021

SwiftUI LazyVStack, LazyHStack, and List for on-screen lazy loading

Use LazyVStack, LazyHStack, or List to avoid loading every SwiftUI row at once when the screen first appears.

SwiftUILazyVStackLazyHStack
Diagram showing inline conditions, conditional views, and conditional modifiers in SwiftUI
November 25, 2020Updated January 26, 2021

SwiftUI basics: conditional views and conditional modifiers

Use ternary expressions for simple values, if statements for conditional views, and custom modifiers when conditional styling should be reusable.

SwiftUIBeginnerConditional Views
Animated demo of a SwiftUI weather view showing placeholder redaction while data loads
November 18, 2020Updated January 26, 2021

SwiftUI .redacted: loading placeholders for remote data

Use .redacted for loading placeholders, keep selected content visible with .unredacted(), monitor redaction state, and add a simple shimmer-like animation.

SwiftUI.redactedLoading UI
Animated demo of iPad pointer interaction over a UIKit button
November 11, 2020Updated January 26, 2021

iPad trackpad support with UIPointerInteraction

Add pointer support to SwiftUI views with hoverEffect, enable it in storyboard buttons, and customize pointer behavior in UIKit with UIPointerInteractionDelegate.

iPadOSUIPointerInteractionSwiftUI
Diagram showing SwiftUI state flow from @State to @Binding to ObservableObject and @Published
November 5, 2020Updated May 27, 2022

SwiftUI view updates with @State, @Binding, and @ObservedObject

A SwiftUI state-management article covering local state, bindings into subviews, and observed object updates from external helpers.

SwiftUI@State@Binding
Safari smart app banner offering an App Clip launch from a website
October 27, 2020Updated October 22, 2021

App Clip complete guide: setup, invocation, saved state, and follow-through

Create the App Clip target, wire associated domains, configure App Store Connect, show the website banner, preserve shared state, confirm location, schedule notifications, and read the launch URL.

App ClipiOS 14SwiftUI
Core Data model editor in Xcode with the Add Entity action highlighted
October 21, 2020Updated January 25, 2021

Add Core Data to an existing SwiftUI app

Create the data model, generate entity classes, add a persistence controller, inject managedObjectContext, fetch items, and choose a merge policy.

SwiftUICore DataiOS
Example SwiftUI login form composed from multiple basic view components
October 17, 2020Updated January 26, 2021

SwiftUI view components for beginners

Common SwiftUI components: text, images, lists, navigation, selection controls, layout stacks, alerts, state, previews, and UIKit bridging.

SwiftUIBeginnerComponents
Widget running on the iOS home screen after being added from an existing app
October 10, 2020Updated January 26, 2021

Add iOS 14 widgets to an existing app with WidgetKit

Adding WidgetKit widgets to an existing app, then making them configurable with the classic iOS 14 intent-based flow.

WidgetKitIntentsSwiftUI
Overview image showing custom toggle style examples in SwiftUI
September 30, 2020Updated January 26, 2021

Build custom toggle styles in SwiftUI

ToggleStyle in SwiftUI, including configuration.label, configuration.isOn, custom switch layouts, SF Symbols, and a playful flashlight example.

SwiftUIToggleStyleiOS
Structured Logger output shown inside Xcode
September 26, 2020Updated January 26, 2021

Use the iOS 14 OS logging framework and read logs in Console.app

Apple's Logger API on iOS 14, including subsystem and category names, privacy markers, visibility differences, and Console.app filtering.

SwiftLoggerOSLog
Crash logs shown inside Xcode for a connected device
September 19, 2020Updated September 28, 2022

Find iOS crash logs and symbolicate them

Fetching crash reports from a device or Xcode, locating the right dSYM, and symbolocating reports with symbolicatecrash or atos.

iOSXcodeCrash Logs
Demo app showing pasteboard pattern detection before reading clipboard contents
September 11, 2020Updated October 30, 2020

Detect clipboard content types before reading the pasteboard on iOS 14

UIPasteboard.detectPatterns, why it matters for iOS 14 privacy prompts, and how to decide whether clipboard content is worth reading at all.

iOS 14UIPasteboardPrivacy
Xcode scheme editor showing a StoreKit Configuration file selected for local in-app purchase testing
September 6, 2020Updated May 22, 2022

Test iOS in-app purchases in Xcode with StoreKit

Xcode's StoreKit Configuration workflow for local in-app purchase testing across consumables, non-consumables, and subscriptions.

StoreKitIn-App PurchaseXcode 12
Paged UIKit screen with a prominent UIPageControl at the bottom
August 27, 2020Updated January 26, 2021

Build a paged UIScrollView with UIPageControl, plus iOS 14 upgrades

Paged UIScrollView layout, UIPageControl wiring, and the iOS 14 UIPageControl additions for custom indicator images, background styles, and scrolling interaction.

UIScrollViewUIPageControlUIKit
Diagram showing Swift models flowing into JSON encoding and back through decoding
August 19, 2020Updated January 25, 2021

Encode and decode JSON strings in Swift

Turning Swift models into JSON, decoding JSON back into models, handling mismatched keys, and comparing Codable with SwiftyJSON.

SwiftJSONCodable
Generated PDF receipt preview shown inside an iOS app
August 12, 2020Updated January 25, 2021

Generate PDF receipts from HTML templates in an iOS app

A practical UIKit walkthrough for building receipt HTML, converting it into PDF data, saving it locally, and presenting it with Quick Look.

iOSSwiftUIKit
Diagram showing Japanese input text flowing through language detection and word tokenization
July 29, 2020Updated January 25, 2021

Use NaturalLanguage for Japanese text processing in Swift

A practical Swift guide to detecting Japanese text and splitting it into word tokens with Apple's NaturalLanguage framework.

iOSSwiftNaturalLanguage
Xcode Simulator status bar showing a custom carrier name
July 28, 2020Updated January 25, 2021

Xcode Simulator management commands

A practical simulator cheat sheet for status bar overrides, appearance changes, push notification testing, and media capture.

XcodeSimulatorsimctl
Animated SwiftUI example showing DisclosureGroup expanding and collapsing cat and dog sections
July 17, 2020Updated January 25, 2021

Use DisclosureGroup to show and hide grouped content in SwiftUI

A compact SwiftUI guide to DisclosureGroup, binding expansion state, and building simple collapsible sections on iOS 14.

SwiftUIDisclosureGroupiOS 14
iOS 14 UICollectionView rendered with a grouped list appearance like a modern table view
July 15, 2020Updated January 25, 2021

Replace UITableView with UICollectionView list layouts on iOS 14

A practical UIKit guide to iOS 14 list-style UICollectionView layouts, header modes, diffable data sources, and snapshots.

iOS 14UICollectionViewUITableView
Xcode screenshot showing the SwiftUI app template that replaced the older app delegate and scene delegate setup
July 14, 2020Updated January 25, 2021

New SwiftUI features in iOS 14: @AppStorage, @SceneStorage, and the SwiftUI app lifecycle

An iOS 14 SwiftUI article focused on storage wrappers and the new app lifecycle.

SwiftUIiOS 14@AppStorage
An App Store recommendation card floating over an app interface using the iOS 14 SKOverlay API
July 8, 2020Updated January 25, 2021

iOS 14 features you could add in just a few lines of code

A UIKit-focused roundup covering several small but useful iOS 14 APIs.

iOS 14UIKitSKOverlay
A UITextView inside a UITableView cell expanding in height as the user types
May 31, 2020Updated January 25, 2021

Auto-size a UITableView cell to fit a UITextView

A UIKit tutorial on making UITextView-backed UITableView cells resize automatically.

UIKitUITableViewUITextView
A screenshot related to extracting and using an SSL certificate for pinning
May 30, 2020Updated January 25, 2021

Swift networking code for URLSession, Alamofire, file upload, and SSL pinning

A Swift networking guide covering Alamofire requests, multipart upload, SSL pinning, and a plain URLSession version.

SwiftURLSessionAlamofire
An iPhone screenshot showing two separate table views rendered in one screen
May 29, 2020Updated January 25, 2021

Multiple UITableViews inside one UIViewController

Extract UITableView delegate and data-source code into a reusable helper class, then wire two separate tables into one view controller.

UIKitUITableViewUIViewController
CloudKit Dashboard showing a Price record type with fields for itemName and itemPrice
May 29, 2020Updated January 25, 2021

CloudKit public database: store public app data without your own server

Use CloudKit public records for shared catalog data, add query indexes, fetch records from Swift, and deploy the schema from development to production correctly.

CloudKitSwiftiOS
Demo GIF showing a toy being dragged from one table view and dropped into another
May 28, 2020Updated January 25, 2021

Add drag and drop support to UITableView

Enable dragInteractionEnabled, build UIDragItem values from table rows, receive drops, and move data between lists.

UIKitUITableViewDrag and Drop
Xcode Signing and Capabilities screen before adding iCloud key-value storage support
May 27, 2020Updated January 25, 2021

How to store user data on iOS: UserDefaults, Core Data, Keychain, and CloudKit

Choose the right iOS storage layer for preferences, structured records, secrets, and cloud-backed data, then follow this article's Xcode setup flow.

iOSSwiftUserDefaults
Animated demo of the Qiita metrics app showing article views and contribution activity
May 26, 2020Updated January 25, 2021

Build an iOS app that shows Qiita views, likes, and contribution activity

Case study covering cookie-backed auth, keychain token storage, URLSession requests, JSON parsing, remote image loading, and a GitHub-style contribution grid for Qiita.

UIKitQiita APIASWebAuthenticationSession
Xcode Devices window showing the Connect via Network checkbox for a physical iPhone
May 25, 2020Updated January 25, 2021

Run and debug on a physical iPhone wirelessly in Xcode

A concise rewrite showing how to connect an iPhone once by cable, enable Connect via Network, then launch and debug wirelessly from Xcode.

XcodeiPhoneWireless Debugging
Xcode project settings showing the localization list and add-language flow
May 24, 2020Updated August 21, 2022

Localize an iOS app and debug localization issues in Xcode

Base language setup, adding localizations, storyboard and string files, simulator language overrides, and missing-string checks.

XcodeiOSLocalization
ResearchKit spatial span memory task running on iPhone
May 23, 2020Updated January 26, 2021

Using ResearchKit on iOS for prototype study tasks and result handling

ResearchKit setup, ORKTaskViewController presentation, delegate-based result handling, and the built-in cognitive, visual, and audio study tasks.

SwiftiOSResearchKit
Xcode creating a regular breakpoint by clicking a line number
May 23, 2020Updated January 25, 2021

Swift debugging techniques: breakpoints, runtime inspection, and crash triage

Print-based debugging, regular and conditional breakpoints, breakpoint actions, po inspection, runtime mutation, and Organizer crash reports.

SwiftXcodeBreakpoints
CloudKit dashboard screen for deploying the development schema to production
May 22, 2020Updated August 18, 2022

Adding CloudKit sync to an existing Core Data app

The capability setup, container configuration, Core Data model changes, NSPersistentCloudKitContainer migration, and production schema deployment.

SwiftCore DataCloudKit
VisionKit document scan flow used before detecting Japanese text regions
May 20, 2020Updated October 19, 2023

Detecting Japanese text regions with VNDetectTextRectanglesRequest

VisionKit document capture, VNDetectTextRectanglesRequest, VNTextObservation results, and overlay drawing for Japanese text regions.

SwiftVisionVisionKit
WWDC scholarship badge photographed in person
May 19, 2020Updated June 12, 2020

How the WWDC student scholarship application worked: Playground, essays, and proof of enrollment

Historical guide covering the pre-2020 WWDC student scholarship format, including the Swift Playground submission, essays, eligibility proof, and inspiration resources.

WWDCAppleStudent Scholarship
Sample cat-ranking app used to demonstrate the memory leak
May 18, 2020Updated January 25, 2021

Debugging iOS memory leaks and reference cycles in Xcode

The Xcode memory graph, leaked view controllers, malloc stack logging, and a weak-delegate fix for a retain cycle.

SwiftXcodeMemory Leak
Examples of iOS app extensions such as iMessage, Today, and Siri extensions
May 17, 2020Updated August 26, 2022

Using Core Data in iOS app extensions with a shared App Group store

App Groups, a custom NSPersistentCloudKitContainer directory override, and shared Core Data access across an iOS app and its extensions.

SwiftCore DataApp Extensions
Flow diagram showing folder selection, Core ML classification, hourly timing, and desktop wallpaper updates
May 16, 2020Updated January 25, 2021

Automatically switch macOS wallpapers with a day and night Core ML classifier

Folder selection, Vision classification, day and night image buckets, an hourly timer, and NSWorkspace desktop image updates on macOS.

SwiftmacOSCore ML
iOS demo showing a user picking an image and getting a classification result from a Vision Core ML request
May 15, 2020Updated January 25, 2021

Label new images with a Core ML model through Vision on iOS and macOS

VNCoreMLModel, VNCoreMLRequest, VNImageRequestHandler, label handling, and demo app links for iOS and macOS.

SwiftVisionCore ML
Xcode file outline showing MARK, TODO, and FIXME annotations in the jump bar
May 14, 2020Updated January 26, 2021

Use MARK, TODO, and FIXME to organize Xcode files

Xcode code annotations: open the file outline from the jump bar, add MARK, TODO, and FIXME comments, and turn long source files into a readable outline.

XcodeSwiftNavigation
Create ML showing a completed image classifier training run
May 14, 2020Updated January 25, 2021

Train a Create ML image classifier for anime day and night scenes

Create ML setup, image collection, training data import, model testing, and exporting the final .mlmodel file.

XcodeCreate MLCore ML
Rounded and outlined UIKit views styled through Swift extensions
May 12, 2020Updated May 27, 2020

Useful Swift extensions for everyday iOS work

Swift convenience extensions for date formatting, alerts, table scrolling, rounded views, custom colors, screenshots, and delegate access.

SwiftUIKitExtensions
Xcode capabilities screen showing iCloud and Sign in with Apple enabled
May 12, 2020Updated January 25, 2021

Store user profiles with CloudKit and Sign in with Apple

ICloud capability setup, CloudKit schema design, Sign in with Apple, first-sign-in user creation, repeat-login fetches, and private CloudKit storage.

SwiftCloudKitiCloud