Mobile
Build and ship iPhone apps with Swift, SwiftUI and UIKit, from first project to the App Store.
A path for becoming an iOS developer. It starts with Swift and how iOS is structured, moves through Xcode, UIKit and SwiftUI, architecture patterns and reactive code, then data, networking and concurrency, and ends with testing, CI/CD and App Store release. Each subject links Apple's documentation or the tool's own docs.
The subjects follow the roadmap.sh iOS roadmap.
iOS apps are written in Swift or Objective-C, and both call the same Apple frameworks. New projects, new APIs and almost all sample code are Swift-first, so learn Swift and pick up enough Objective-C to read older code.
Apple's open-source language: type-safe, with optionals instead of null pointers, value types, protocols with extensions, generics and built-in structured concurrency. It is the language of SwiftUI and every new Apple framework.
Announced at WWDC 2014 and open-sourced in 2015, Swift was built to replace Objective-C with something safer and more expressive while staying compatible with the existing Cocoa frameworks.
Optionals catch nil at compile time, structs and enums with associated values model data cleanly, there is no header/implementation split, and type inference plus async/await keep code short. Objective-C's runtime is still more dynamic.
let vs var, optionals and if let/guard let, collections, switch with pattern matching, structs vs classes, enums, protocols, extensions and closures. Write small programs in a Playground to drill them.
C with Smalltalk-style messaging, the language most of UIKit and Foundation were written in. You will meet it in older codebases, third-party SDKs and when reading Apple's own headers.
Classes split into .h interface and .m implementation, square-bracket messages like [obj doThing:x], @property, protocols, categories and blocks. Sending a message to nil silently returns zero.
Swift calls Objective-C through a bridging header; Objective-C sees Swift classes marked @objc through the generated -Swift.h header. Nullability annotations decide whether imported types become optionals.
iOS is built in layers: Core OS at the bottom (kernel, drivers, security), Core Services (Foundation, networking, data), Media (graphics, audio, video) and Cocoa Touch on top (UIKit and app-level services). Higher layers are easier to use; drop lower only when you need the control.
The Darwin kernel, file system, networking stack, power management and security services such as the Keychain and Secure Enclave access that everything else sits on.
Foundation and Core Foundation (strings, dates, collections, URLSession), plus system services like Core Location, CloudKit and Core Data.
The layer for graphics, animation, audio and video — Core Graphics, Core Animation, Core Image, AVFoundation, Core Audio and Metal.
The top layer apps mostly code against: UIKit for views, events and the app lifecycle, plus frameworks for notifications, sharing and other app services.
Quartz 2D: drawing paths, gradients, images and PDFs into a CGContext, plus the CGRect/CGPoint geometry types used everywhere in UIKit.
Playing, recording and editing audio and video: AVPlayer, AVCaptureSession for the camera, AVAudioSession for audio routing, and composition and export.
GPU-accelerated image processing with built-in CIFilters you can chain, applied to photos or live camera frames.
The low-level audio stack (Audio Units, Audio Queue) for latency-sensitive work such as synthesis or effects; AVAudioEngine covers most needs at a higher level.
Apple's low-overhead GPU API for 3D rendering and compute shaders, the base under Core Animation, SpriteKit and Core ML acceleration. Reach for it in games and heavy visual work.
The language-level ideas every iOS codebase relies on: object-oriented and functional styles, ARC memory management, how view controllers live and die, error handling and concurrency. Weakness here shows up as leaks, crashes and frozen UIs.
Classes with inheritance and reference semantics, as UIKit uses throughout (UIViewController subclasses). Swift also favours protocols and composition over deep class hierarchies.
Immutable values, pure functions and higher-order functions like map, filter, reduce and compactMap. Swift's value types and closures make this style natural.
Automatic Reference Counting frees objects when their strong count hits zero. Strong reference cycles leak; break them with weak or unowned, typically for delegates and closures capturing self.
loadView, viewDidLoad (once), viewWillAppear/viewDidAppear and their disappear counterparts (every time), and viewDidLayoutSubviews after layout. Put one-time setup and per-appearance refresh in the right place.
Functions marked throws are called with try inside do/catch; try? turns errors into nil and try! crashes on failure. Result carries errors through callbacks.
Keep the main thread free for UI and do slow work elsewhere — with dispatch queues in older code or async/await, tasks and actors in modern Swift — then return to the main actor to update views.
Track every change, work on branches and collaborate through pull requests. Xcode has built-in Git support, but learn the command line too, and gitignore xcuserdata and DerivedData.
Apple's IDE for building, running, debugging, profiling and shipping apps, available only on macOS. Learning its layout and shortcuts pays back every day.
Install from the Mac App Store or download specific versions from the developer site; then add simulator runtimes and run xcode-select to pick the active toolchain.
Settings (formerly Preferences) for accounts used in signing, themes, key bindings, text editing, behaviours and installed platforms.
Choose the App template, interface (SwiftUI or Storyboard), bundle identifier and team. The project creates a target, an asset catalog and the app entry point.
The workspace window: navigator area on the left, editor in the centre, inspectors on the right and the debug area at the bottom, each toggled with keyboard shortcuts.
Run and stop buttons, the scheme and run-destination picker (simulator or device), and the activity view showing build progress, warnings and errors.
Panels for the project tree, source control, symbols, find, issues, tests, debug, breakpoints and reports. Cmd+Shift+O (Open Quickly) is the fastest way to jump to a file or symbol.
The source editor plus the canvas for SwiftUI previews, Interface Builder for storyboards, and split or assistant editors for side-by-side files.
The .xcodeproj bundle (with its project.pbxproj), workspaces, targets, build settings, schemes, Info.plist, entitlements and asset catalogs.
Folders in the project navigator that organise files; newer Xcode versions default to folders that mirror the file system, avoiding many project-file merge conflicts.
Pause execution at a line; edit them to add conditions, ignore counts, or actions such as logging without stopping. Symbolic and exception breakpoints catch crashes at the source.
Shows threads and stack frames when paused, and live CPU, memory, disk and network gauges while running — a first look before opening Instruments.
Step over, step into and step out to move line by line, and continue to resume. Inspect variables in the variables view or with po and p in the LLDB console.
The imperative UI framework behind iOS since 2008: you create view objects, add them to a hierarchy and update them by hand when state changes. Still essential for existing apps and for features SwiftUI does not cover.
Stock controls such as UILabel, UIButton, UITextField, UISwitch, UIImageView, UITableView and UICollectionView, all configurable in code or Interface Builder.
UIView draws a rectangle, handles touches and hosts subviews. Each is backed by a CALayer; frame is in the parent's coordinates and bounds in its own.
UIViewController owns a screen's root view, responds to lifecycle events and coordinates with models and other controllers. Keep them small: they bloat fast.
Controls send events through target-action, gesture recognizers handle taps, swipes and pans, and the responder chain routes touches and keyboard input.
A first screen: stack views of labels, buttons and text fields, a list via UITableView with a data source, and handling input to update the display.
Moving between screens with navigation controllers (drill-down), tab bar controllers (top-level sections) and modal presentation for focused tasks.
Built-in push and modal animations, UIView.transition(with:) for swapping content, and custom transitions via UIViewControllerAnimatedTransitioning and interactive controllers.
How the two split the work: views draw and lay out, controllers own and configure them. Child view controllers let you compose a screen from smaller reusable controllers.
UINavigationController keeps a stack of controllers with a back button; storyboard segues wire transitions, with data passed in prepare(for:sender:).
pushViewController(_:animated:) adds a screen to the navigation stack; present(_:animated:) shows one modally. Push for hierarchy, present for interruptions or self-contained tasks.
Modal styles (page sheet, full screen, form sheet) and sheet detents, dismissing with dismiss(animated:), and wrapping a modal in its own navigation controller when it has several steps.
Xcode's visual editor for UIKit layouts, saved as storyboards and XIBs and connected to code through outlets and actions. Many teams build UI in code instead, but you will meet both.
One file holding several screens and the segues between them. Good for small flows; large ones get slow and merge badly, so split them per feature.
Single-view interface files, typically for reusable cells or custom views, loaded with UINib or Bundle.main.loadNibNamed.
Properties marked @IBOutlet that point at views from a storyboard or XIB. A renamed outlet with a stale connection crashes at load time with a key-value coding error.
Methods marked @IBAction that controls call through target-action, for example on .touchUpInside, wired by Control-dragging in the editor.
Constraint-based layout that sizes views for any screen and Dynamic Type. Write constraints with layout anchors and NSLayoutConstraint.activate, and lean on UIStackView to need fewer of them.
Apple's declarative UI framework: you describe views as a function of state, and the framework updates the screen when the state changes. It is the default for new apps and the only option for some newer platform features.
Views are lightweight structs whose body returns other views, composed with stacks and result builders. Describe what the screen should look like, not the steps to change it.
Compose screens from VStack, HStack, ZStack, List, Form, ScrollView and grids, and iterate fast with #Preview canvases.
Modifiers such as .padding(), .font() and .background() wrap a view in a new one, so order matters: padding before background is not the same as after.
@State for local values, @Binding to share them with children, @Observable model classes with @Environment or plain properties for shared data. Keep one source of truth per piece of state.
A Binding is a two-way reference to state owned elsewhere, created with $value; controls like TextField and Toggle read and write through it.
NavigationStack with navigationDestination(for:) and a path array gives data-driven, programmatic navigation and deep links; NavigationSplitView handles multi-column layouts.
The original SwiftUI navigation container, now deprecated in favour of NavigationStack and NavigationSplitView. You will still find it in older code.
A button that pushes a destination. Prefer the value-based form, NavigationLink(value:), paired with navigationDestination, over embedding the destination view directly.
Show modals with .sheet, .fullScreenCover, .alert and .confirmationDialog driven by state, and close them with the dismiss environment action.
Apps that feel native follow the platform's conventions for layout, navigation, typography and gestures. Use system components and SF Symbols where possible, support Dark Mode and Dynamic Type, and respect safe areas.
Apple's Human Interface Guidelines: platform design principles plus detailed guidance per component, pattern and input. App Review leans on them, so read the iOS sections before designing.
The layer-based compositing engine behind all iOS rendering. Every UIView has a CALayer, and animating layer properties runs on the render server, off your main thread.
UIView.animate and spring animations for most UI, CABasicAnimation and CAKeyframeAnimation for layer properties, and withAnimation in SwiftUI. Animate transform and opacity for smooth results.
Airbnb's library that plays After Effects animations exported as JSON, letting designers ship complex vector animations without hand-coding them.
Ways to split responsibilities so screens stay testable and changeable. Most teams use MVC or MVVM; heavier patterns pay off in large apps with many developers.
Apple's classic pattern: models hold data, views display it, controllers mediate. In UIKit the controller and view are tightly coupled, which leads to "massive view controllers" if you are not careful.
A presenter holds the screen's logic and talks to a passive view through a protocol, making the logic unit-testable without UIKit.
A view model exposes display-ready state the view binds to — a natural fit for SwiftUI with @Observable, or for UIKit with Combine. Keep view models free of UIKit imports.
MVVM plus coordinators: objects that own navigation flow, so view controllers no longer push each other and screens can be reused in different flows.
View, Interactor, Presenter, Entity, Router — each screen split into five single-purpose parts. Very testable but verbose; usually only worth it on large teams.
The Composable Architecture from Point-Free: state, actions, reducers and effects in a unidirectional flow, composed across features and tested exhaustively.
Modelling events and changing values as streams you transform and subscribe to. Apple's Combine is built in; RxSwift predates it and remains in many codebases. Swift concurrency's AsyncSequence now covers many of the same cases.
Apple's reactive framework: publishers emit values over time, operators transform them and subscribers consume them. @Published and sink are where most people start.
A publisher declares Output and Failure types; a subscription starts on sink or assign and lasts as long as you hold the AnyCancellable, usually in a Set.
Chain map, filter, debounce, removeDuplicates, flatMap, combineLatest and receive(on:) into pipelines — for example, debounced search text to network request to results.
View models expose @Published properties and views (or UIKit controllers) subscribe to them, so UI updates automatically when state changes.
The Swift port of ReactiveX, with RxCocoa bindings for UIKit. Common in apps started before Combine existed or that support old iOS versions.
An Observable emits next events then ends with error or completed; subscribe returns a Disposable you add to a DisposeBag to avoid leaks.
Both observer and observable: PublishSubject relays new events, BehaviorSubject replays the latest value, ReplaySubject a buffer. RxRelay's relays never error or complete.
Functions that transform, filter and combine observables — map, flatMapLatest, throttle, zip, merge — the same family as Combine's operators under different names.
Decide which thread work runs on: subscribe(on:) for upstream work, observe(on: MainScheduler.instance) before touching UI.
View models take input observables (taps, text) and output drivers that RxCocoa binds to views, keeping controllers thin.
An object hands some decisions or events to another object through a protocol — how UITableView, UITextField and many system classes talk back to your code. It suits one-to-one communication with several callbacks.
Define a class-bound protocol, give the delegating object a weak var delegate, call methods on it, and have the owner conform and set itself. Forgetting weak creates a retain cycle.
Passing a function to be called later, typically as a completion handler when async work finishes. Simple and everywhere in older APIs, but nesting them quickly becomes hard to follow.
Self-contained blocks of code that capture surrounding values, with short syntax like trailing closures and $0. They are Swift's function values.
Use closures for completion handlers, sorting, animations and higher-order functions. Mark a parameter @escaping when it is stored or called after the function returns.
Closures capture variables by reference and hold strong references to objects, including self. Use a capture list like [weak self] when the closure is stored by something self owns.
Deeply nested completion handlers where error handling repeats at every level and it is easy to forget to call completion. async/await flattens it into straight-line code.
Swift's structured concurrency, from Swift 5.5: async functions suspend instead of blocking, await marks suspension points, and errors propagate with throws. Wrap old callback APIs with withCheckedContinuation.
Task and task groups run work in parallel with cancellation, actors protect mutable state, and @MainActor pins UI code to the main thread. Swift 6 checks for data races at compile time.
Keeping data between launches. Match the store to the data: small settings in User Defaults, secrets in the Keychain, files on disk, and structured data in Core Data, SwiftData or SQLite.
Apple's object graph and persistence framework, usually backed by SQLite, with change tracking, relationships, migrations and CloudKit sync. SwiftData is the newer Swift-native layer on the same engine.
A key-value store for small preferences such as flags and settings, also available as @AppStorage in SwiftUI. Not for secrets or large data — it is loaded in memory and unencrypted.
Encrypted storage for passwords, tokens and keys through the SecItem APIs, with accessibility classes controlling when items can be read. Items can survive app deletion.
Each app has a sandbox: Documents for user data (backed up), Application Support for app files, Caches for disposable data and tmp. Locate them with FileManager and write atomically.
The embedded SQL database built into iOS, used directly through its C API or wrappers such as GRDB when you want explicit SQL and control over queries.
The data formats APIs and files exchange. Swift's Codable maps JSON to typed models with almost no code; XML is less common but still appears in feeds and older services.
Decode JSON with JSONDecoder into Decodable types, using CodingKeys or keyDecodingStrategy for name mismatches. Parse XML with the event-driven XMLParser.
Encode Encodable values with JSONEncoder, choosing date and key strategies and outputFormatting; PropertyListEncoder writes plists the same way.
Talking to servers over HTTPS, decoding responses and handling failure, slow connections and offline use. Foundation's URLSession covers almost everything with async/await.
Methods, status codes, headers and caching. App Transport Security requires HTTPS by default; exceptions in Info.plist need a justification at review.
Resource-oriented APIs using HTTP verbs and JSON. Model endpoints as typed requests and Codable responses, and handle pagination, auth tokens and retries in one client layer.
A query language where the client asks for exactly the fields it needs from one endpoint. Apollo iOS generates Swift types from your queries and schema.
try await URLSession.shared.data(for:) covers most requests; configure sessions for timeouts, caching and background downloads that continue after the app is suspended.
A popular networking library on top of URLSession with request chaining, validation, retry policies and upload helpers. Useful, but no longer necessary for most apps.
The lower-level tools under Swift concurrency, still common in existing code. Rules stay the same: never block the main thread, never touch UIKit off it, and protect shared mutable state.
Grand Central Dispatch: submit closures to the main queue, global concurrent queues by quality of service, or your own serial queues. DispatchGroup waits for several jobs; sync on the current queue deadlocks.
OperationQueue runs Operation objects with dependencies, cancellation and a max concurrency limit — handy for pipelines like download then process then save.
Tools that fetch and version third-party libraries. Swift Package Manager is built into Xcode and is the default today; CocoaPods and Carthage remain in older projects.
Packages are described in Package.swift and added through Xcode, with versions pinned in Package.resolved. It supports binary targets, resources and plugins.
A Ruby-based manager that generates an .xcworkspace from a Podfile. Its trunk repository has become read-only, so prefer SwiftPM for new work.
A decentralised manager that builds frameworks (XCFrameworks) you add to the project yourself, without touching project files. Rarely chosen for new projects now.
How code is packaged for reuse across targets and apps. The choice between static and dynamic linking affects launch time, app size and how resources are bundled.
A bundle holding builds of a library for several platforms and architectures (device, simulator, macOS), created with xcodebuild -create-xcframework; the standard way to ship binary SDKs.
Object code copied into the app binary at link time. No load cost at launch, but each linking target gets its own copy, and resources must be shipped separately.
Loaded by the dynamic linker at launch and shared by the app and its extensions. Too many dynamic frameworks slow launch; mergeable libraries in recent Xcode help.
Making apps usable with VoiceOver, larger text, Switch Control and other assistive features. Standard controls get most of it free; custom views need labels, traits and sensible ordering.
An Xcode developer tool that shows each element's label, traits and frame, simulates settings, and runs audits that flag missing labels, small hit targets and contrast problems.
The built-in screen reader. Give elements accessibilityLabel, accessibilityHint and traits, group related views, and test with VoiceOver on a real device.
Text that follows the user's size setting. Use text styles like .body and .headline, set adjustsFontForContentSizeCategory in UIKit, and make layouts reflow at the largest sizes.
Apple's system frameworks for specific capabilities. Learn the ones your app needs; each comes with its own privacy permissions and Info.plist usage strings.
Augmented reality: world tracking, plane and image detection, face tracking and scene reconstruction on LiDAR devices, rendered with RealityKit or SceneKit.
Reading and writing health and fitness data in the shared Health store with per-type user authorisation. Strict App Review rules apply to how that data is used.
Game Center features: player authentication, leaderboards, achievements and real-time or turn-based multiplayer.
Embedded Apple Maps with annotations, overlays, search and directions; SwiftUI has a native Map view. Pair it with Core Location for the user's position.
On-device machine learning: run models converted with coremltools on the CPU, GPU or Neural Engine. Vision and Natural Language wrap common tasks on top of it.
Linters and formatters enforce a consistent style automatically, so code review can focus on logic. Run them locally as a build phase or pre-commit hook and again in CI.
A rule-based linter configured with .swiftlint.yml; it can run as an Xcode build phase or plugin, and some rules support --fix.
Reformats Swift code to a configurable style — indentation, spacing, redundant self, import order. Apple also ships swift-format with recent toolchains.
An older cross-platform Swift static analyser for style and complexity metrics. It is no longer maintained; prefer SwiftLint.
Finding why something is wrong or slow: breakpoints and LLDB for logic, the view and memory graph debuggers for UI and leaks, and Instruments for performance. Reproduce first, then narrow down.
LLDB with po, p and expression, the view hierarchy debugger for layout bugs, the memory graph debugger for retain cycles, and sanitizers for threading and memory errors.
Instruments records traces: Time Profiler for CPU, Allocations and Leaks for memory, Hangs and Animation Hitches for UI smoothness. Always profile release builds on a real device.
Automated tests catch regressions before users do. Unit tests check logic in isolation and run fast; UI tests drive the real app and are slower and flakier, so keep them to key flows.
The long-standing test framework: XCTestCase subclasses, XCTAssert functions, async tests and performance measurement. Swift Testing (@Test, #expect) is Apple's newer alternative.
UI tests that launch the app with XCUIApplication and find elements through the accessibility tree. Use accessibility identifiers for stable queries and wait for elements instead of sleeping.
Test plans run the same tests under different configurations — languages, sanitizers, environment variables. Turn on code coverage to see which lines tests actually reach.
Build, test and ship every change automatically. iOS builds need macOS runners, code signing set up on them, and caching of packages and derived data to stay fast.
Workflows in YAML run on GitHub-hosted macOS runners with Xcode preinstalled; store signing assets as encrypted secrets.
GitLab CI/CD pipelines in .gitlab-ci.yml, using GitLab's hosted macOS runners or your own Mac runner.
Self-hosted automation server; for iOS you attach Mac agents and maintain Xcode on them yourself — flexible but the most upkeep.
Hosted CI with macOS executors and selectable Xcode images, configured in .circleci/config.yml.
Microsoft's pipelines with Microsoft-hosted macOS agents and built-in Xcode and signing tasks, common in enterprise shops.
Ruby tooling that scripts the tedious parts of shipping: match syncs signing certificates and profiles, gym builds, scan runs tests, pilot uploads to TestFlight and deliver pushes metadata and screenshots. Lanes in a Fastfile run the same locally and in CI.
Apple's beta distribution: internal testers from your team get builds right away, while external testers (up to 10,000, by email or public link) need a lighter beta review first. Builds expire after 90 days.
Shipping to users: a paid developer account, signing certificates and provisioning profiles, archiving and uploading through Xcode, then metadata, privacy details and screenshots in App Store Connect before App Review.
Helping people find and choose your app in search: the name, subtitle and keyword field carry most search weight, while icon, screenshots, preview video and ratings drive conversion. Product page optimisation lets you A/B test those assets.
Apple's yearly developer conference in June introduces the next iOS, Xcode and Swift releases, with betas the same day and final versions in September. Watching the sessions that touch your app keeps you ahead of deprecations and new requirements.
Follow the Swift blog and the Swift Evolution proposals to see what each release adds and which language modes and warnings change.
Each SDK brings new APIs and deprecations, and App Store Connect eventually requires building with a recent Xcode. Check the release notes when you upgrade.
The developer news feed and "What's new" pages summarise new frameworks, capabilities and policy changes, such as privacy manifests or new review rules.