• Coming Soon on App Store
  • Home
  • Contents
    • Articles
    • Videos
  • Channels

Nav Menu

  • Home
  • Articles
  • Videos
  • Channels

Copyright By SoftSky App LTD - 2025

  • Contact Us
  • Terms of Use
  • Privacy Policy

Since 2019, I'm publishing articles on iOS and Swift topics here on tanaschita.com. I’m passionate about programming and at least as much about teaching programming. Besides running this site, I'm freelancing as an iOS developer since 2012. Since then, I worked for many companies of different sizes on complex user-focused software applications.

RSShttps://tanaschita.com/rss.xml
  • beginner
  • By Natascha Fadeeva
  • Aug 31

Switching Swift Package Manager dependencies between versioned and local development

Quick tip: When iterating on your own Swift package, switch its dependency in Xcode from a versioned Git URL (e.g., from: 1.2.0) to a local path via Package Dependencies > Add Local.... Edits in the local checkout reflect immediately. After finishing, tag a release and switch back.

  • beginner
  • By Natascha Fadeeva
  • Aug 24

How to use async/await in synchronous Swift code with tasks

Call async/await from synchronous Swift by wrapping work in Task { ... }. Fix the SwiftUI Button action error; same trick applies in AppDelegate. Notes: Task starts immediately; you don’t need to keep it unless you want control (e.g., cancellation).

  • beginner
  • By Natascha Fadeeva
  • Aug 18

My new book on architecture & design patterns for iOS

Announcement of a new iOS book on architecture and design patterns. It focuses on building scalable, maintainable apps with Swift and SwiftUI, covering dependency injection, navigation, common patterns, and modularization to improve code structure and longevity.

  • beginner
  • By Natascha Fadeeva
  • Aug 11

How to create a custom reusable toolbar in SwiftUI

Create a reusable SwiftUI toolbar: implement ToolbarContent with a custom back button and title; apply via .toolbar using ToolbarItemGroup(.navigationBarLeading) and .principal; wrap in a ViewModifier and View extension for a one-line API. Uses @Environment(.presentationMode) and hides the stock back button.

  • intermediate
  • By Natascha Fadeeva
  • Aug 3

How to use the @available attribute in Swift

The article explains Swift's @available attribute for controlling code availability across platforms and language versions. It covers attribute syntax, arguments like `introduced`, `deprecated`, `unavailable`, `renamed`, combining multiple declarations, and shorthand syntax. Key takeaway: developers can use @available to manage API compatibility and deprecation with compiler-enforced version checks.

  • intermediate
  • By Natascha Fadeeva
  • Jul 27

Overview on Accessibility Nutrition Labels for iOS development

Explains Apple's Accessibility Nutrition Labels introduced at WWDC25, which appear on the App Store to show which accessibility features apps support. Covers implementing support for VoiceOver, Voice Control, Dynamic Type, Dark Mode, color differentiation, sufficient contrast, reduced motion, captions, and audio descriptions. Provides practical SwiftUI implementation guidance including accessibilityLabel, accessibilityReduceMotion environment values, Color Contrast Calculator usage, and AVPlayer caption support. Essential overview for developers wanting to make their iOS apps more inclusive and meet App Store accessibility requirements.

  • intermediate
  • By Natascha Fadeeva
  • Jul 20

Using defer in Swift to manage state cleanup

Learn to use Swift's defer statement for reliable state cleanup in async functions. The defer block executes when scope exits regardless of completion type - normal return, error, early return, or task cancellation during await. Shows practical example of managing loading indicator state where defer ensures isLoading=false always runs, compared to manual cleanup in multiple locations. Key benefit: centralized cleanup logic reduces bugs in async/error-prone code by guaranteeing execution.

  • beginner
  • By Natascha Fadeeva
  • Jul 6

Supporting sufficient contrast accessibility with Xcode's Color Contrast Calculator

A quick guide on using Xcode's built-in Color Contrast Calculator to verify color accessibility compliance. Shows how to access the tool via Xcode → Open Developer Tool → Accessibility Inspector → Show Color Contrast Calculator, pick colors using color pickers, and check if contrast ratios meet accessibility guidelines. Essential for supporting users with low vision to distinguish UI elements.

  • beginner
  • By Natascha Fadeeva
  • Jun 29

How to support Dynamic Type accessibility in SwiftUI

How to support Dynamic Type in SwiftUI: use system text styles (.body, .headline, .title) for automatic scaling. Custom fonts scale from iOS 14 and can be tied to a style with relativeTo:. Scale layout metrics with @ScaledMetric(relativeTo:). Use fixed-size fonts only when necessary.

  • intermediate
  • By Natascha Fadeeva
  • Jun 22

Using WebKit with SwiftUI to manage web content

iOS 17 adds SwiftUI‑native WebKit: WebView(url:) for simple page display, and WebPage for programmatic control. Examples show loading via URLRequest/HTML/data, observing currentNavigationEvent, and calling JavaScript. For iOS <17, bridge WKWebView with UIViewRepresentable using availability checks.

  • beginner
  • By Natascha Fadeeva
  • Jun 11

WWDC 2025 summary of Apple's platforms state of the union talk for iOS developers

WWDC 2025 summary covering Apple's key iOS announcements: Liquid Glass design for enhanced UI depth/fluidity (auto-applied via Xcode 26 recompilation), new Icon Composer tool, Apple Intelligence API with Foundation Models framework for on-device ML, Xcode 26 with ChatGPT integration, Swift 6.2 with inline arrays/span types/concurrency improvements, SwiftUI WebView support and AttributedString TextEditor, and VisionOS shared spatial experiences.

  • beginner
  • By Natascha Fadeeva
  • Jun 7

Adding navigation buttons to the keyboard in SwiftUI

Add prev/next buttons above the keyboard to switch SwiftUI TextFields. Use @FocusState to track focus, toolbar(.keyboard) + ToolbarItemGroup for the buttons, and TextField.focused. Compute previous/next from an ordered Field array using modulo for wraparound. HStack+Spacer can align buttons.

  • beginner
  • By Natascha Fadeeva
  • Jun 1

Understanding toolbars in SwiftUI

Practical guide to SwiftUI toolbars: use toolbar() with ToolbarItem/ToolbarItemGroup to place actions in .bottomBar, .principal, .navigationBarLeading/Trailing, .keyboard, and modal sheets via .confirmationAction/.destructiveAction/.cancellationAction. Replaces navigationBarItems().

  • beginner
  • By Natascha Fadeeva
  • May 25

Learn to build adaptive layouts with SwiftUI's ViewThatFits container.

SwiftUI’s ViewThatFits enables adaptive layouts by providing multiple child views and automatically choosing the first that fits. Example: full Text vs truncated Text + “more” Button using .fixedSize() and .lineLimit(1). It evaluates children by ideal size; restrict with in: .horizontal.

  • beginner
  • By Natascha Fadeeva
  • May 18

Understanding LLDB print commands for iOS debugging with Xcode

Guide to LLDB print commands in Xcode: v (frame variable) reads memory for stored properties—fast, no code execution. p (expression) compiles/executes to evaluate expressions and computed properties. po prints object descriptions (uses CustomDebugStringConvertible). Use v for timing‑sensitive debugging; combine with breakpoints that auto‑continue to log without pausing.

  • intermediate
  • By Natascha Fadeeva
  • May 11

Scheduling notifications with time, calendar, and location triggers in iOS

Learn to schedule local notifications in iOS using UserNotifications framework with three trigger types: UNTimeIntervalNotificationTrigger for time-based delays, UNCalendarNotificationTrigger for specific dates/recurring schedules using DateComponents, and UNLocationNotificationTrigger for geographic region entry/exit events. Covers practical code examples for each trigger type, configuration options like repeats and notifyOnEntry/Exit properties, and important considerations about location permissions and power-saving mode effects.

  • beginner
  • By Natascha Fadeeva
  • May 4

Working with Xcode configuration files

Use Xcode .xcconfig files for Debug/Staging/Release: create one per config, link in Project > Info, define keys (APP_DISPLAY_NAME, FEATURE_X_ENABLED), reference via $(KEY) in Info.plist, read with Bundle.main. Notes: no quotes; YES/NO are strings; // in http URLs is comment (use https:/$()/...).

  • beginner
  • By Natascha Fadeeva
  • May 3

Creating and managing multiple app environments in Xcode

Step-by-step guide to set up Debug/Staging/Release in Xcode: add a new build configuration, duplicate schemes and map Build/Run/Test to the right config, and customize bundle ID, icons, names, and versions. Define env vars in build settings or Info.plist (read via Bundle.main). Optionally use xcconfig files.

  • intermediate
  • By Natascha Fadeeva
  • Apr 27

Bridging interfaces with the Adapter pattern in Swift

Shows how to use the Adapter pattern to integrate a third-party SDK with your app’s SearchService protocol. Wrap a completion-based API in async/await using withCheckedThrowingContinuation and map untyped results to SearchResult. Keeps domains decoupled and maintainable.

  • intermediate
  • By Natascha Fadeeva
  • Apr 20

How to persist navigation state in SwiftUI

Explains how to persist and restore SwiftUI NavigationPath across app launches. Make route types Hashable & Codable, JSON‑encode the path and store it (UserDefaults, file system, or Keychain), then decode on launch. Caveats: only Codable types, stable route schema, lightweight associated values.

  • intermediate
  • By Natascha Fadeeva
  • Apr 13

Using NavigationPath with TabView in SwiftUI

How to integrate NavigationPath with TabView to keep independent navigation stacks per tab. Build an AppRouter (selectedTab + per‑tab routers), each owning a NavigationPath and Route enum. Bind NavigationStack to the path, use navigationDestination, and handle deep links via onOpenURL to switch tabs and push routes.

  • beginner
  • By Natascha Fadeeva
  • Apr 5

Testing remote iOS push notifications in a simulator with simctl

How to test remote push notifications in the iOS Simulator with simctl: create a .apn JSON payload and deliver it via xcrun simctl push booted file. Also shows listing devices, targeting by UUID, and testing deep links, actions, and custom data—no physical device required.

  • intermediate
  • By Natascha Fadeeva
  • Mar 31

Building a dependency injection framework

Build a lightweight DI container in Swift: register factories by type, resolve dynamically, and support lifetimes (transient vs singleton). Add an @Injected property wrapper resolving from a shared container; with @Observable mark deps @ObservationIgnored. Notes: thread safety, error handling, keying.

  • beginner
  • By Natascha Fadeeva
  • Mar 23

Public-key cryptography with CryptoKit for iOS

Explains public‑key crypto and implementing it in iOS with CryptoKit: generate ECC key pairs (Curve25519 or P256), export with rawRepresentation, sign via signature(for:), verify with isValidSignature. Prefer Curve25519 for performance; use it to exchange a symmetric key.

  • intermediate
  • By Natascha Fadeeva
  • Mar 16

Understanding existentials and primary associated types in Swift

Explains how existentials (any Protocol) let protocols with associated types be stored in heterogeneous collections (e.g., [any Shape]), trading static type info for runtime casts. Shows using primary associated types (protocol) to name the associated type and regain type safety where needed.

  • intermediate
  • By Natascha Fadeeva
  • Mar 9

Understanding structural identity in SwiftUI

SwiftUI’s structural identity lets the framework rebuild views on state changes yet preserve state and redraw minimally, based on view type/position/ancestors. Explains update vs redraw, @State/body, if–else state loss, ZStack + opacity/accessibilityHidden to persist state, and List Identifiable/id for stable diffs.

  • intermediate
  • By Natascha Fadeeva
  • Mar 2

Understanding the Bindable property wrapper in SwiftUI

Explains when @Bindable is needed with SwiftUI’s Observation. Child views can read @Observable models directly, but controls like TextField require a Binding. Add @Bindable var userViewModel to enable $userViewModel.property bindings and resolve “Cannot find '$…' in scope” errors.

  • intermediate
  • By Natascha Fadeeva
  • Feb 23

Quick guide on home screen quick actions for SwiftUI

Add Home Screen quick actions in SwiftUI. Define static items in Info.plist (UIApplicationShortcutItems; title/subtitle, SF Symbol; localize via InfoPlist.strings) or create dynamic items with UIApplication.shared.shortcutItems. Handle taps in a UIKit SceneDelegate; refresh on background via scenePhase.

  • intermediate
  • By Natascha Fadeeva
  • Feb 16

How to use SceneDelegate in SwiftUI

Integrate SceneDelegate in SwiftUI to handle Home Screen quick actions. Implement windowScene(_:performActionFor:) and scene(_:willConnectTo:options:). Create AppDelegate that sets UISceneConfiguration.delegateClass and wire it with @UIApplicationDelegateAdaptor.

  • beginner
  • By Natascha Fadeeva
  • Feb 9

Implementing Face ID authentication in SwiftUI

How to add Face ID/Touch ID with passcode fallback in SwiftUI using LocalAuthentication. Add NSFaceIDUsageDescription, check canEvaluatePolicy(.deviceOwnerAuthentication), call evaluatePolicy and handle LAError. Integrate with SwiftUI state, test via Simulator; biometrics are isolated in Secure Enclave.

  • beginner
  • By Natascha Fadeeva
  • Feb 2

SF Symbols guide for SwiftUI and UIKit

Guide to SF Symbols in SwiftUI and UIKit: add icons with Image/UIImage(systemName:), size via font and imageScale, customize using UIImage.SymbolConfiguration. Explains monochrome, hierarchical, palette, multicolor rendering, text integration (Label/NSTextAttachment), availability and custom symbols.

  • beginner
  • By Natascha Fadeeva
  • Jan 26

Learn to debug iOS features that require app start from external actions in Xcode

Xcode detaches after an app is killed, making deep links and Home Screen Quick Actions hard to debug. Edit Scheme > Info > Launch and select “Wait for executable to be launched”, run, then manually open the app. Xcode auto‑attaches so you can use breakpoints and logs.

  • beginner
  • By Natascha Fadeeva
  • Jan 19

Customizing the appearance of the NavigationStack title in SwiftUI

Customize NavigationStack titles in SwiftUI: keep a compact title with navigationBarTitleDisplayMode(.inline), or replace the default title with any view using toolbar and ToolbarItem(placement: .principal). Includes clear code for consistent, customizable navigation bars.

  • beginner
  • By Natascha Fadeeva
  • Jan 12

How to use cryptographic hash functions in CryptoKit for iOS security

Explains cryptographic hash functions and using CryptoKit in Swift. Demonstrates hashing a password with SHA256.hash(Data(password.utf8)) and mapping digest bytes to a hex string (String(format: "%02x")). Mentions SHA‑512, common uses (integrity, auth), and that SHA‑256 is a good default.

  • intermediate
  • By Natascha Fadeeva
  • Jan 6

Preparing for a technical iOS job interview with questions and answers in 2025 - book preview

Preview of an updated 2025 iOS interview Q&A book. Covers Swift, SwiftUI (avoid AnyView for performance), Xcode schemes, Combine subjects vs publishers, networking/OAuth, async/await, SwiftData migration, hashing, MVVM trade-offs, Swift Testing parameterized tests, UIKit, Obj‑C.

  • intermediate
  • By Natascha Fadeeva
  • Jan 5

Understanding opaque types and protocols with associatedtype in Swift

Shows how protocols with associatedtype or Self can’t be used directly as parameters/returns and how opaque types using the 'some' keyword simplify this. Demonstrates 'func cleanup(store: some Store)' as syntactic sugar for a generic function, with the compiler inferring concrete types.