iOS: What It Is, System Architecture and Swift Language

Author: IT Sectr Published: 2026-02-07 Reading time: 10 min

iOS is Apple's mobile operating system powering iPhone and iPod touch. iOS development is done in Swift using Xcode. Let's explore the platform architecture, key frameworks, and the App Store publishing process.

Key Takeaways

  • iOS is a monolithic OS with the XNU kernel, Darwin core layer, and Cocoa Touch user layer
  • Swift is the primary development language with ARC automatic memory management and protocol-oriented programming
  • UIKit and SwiftUI are two interface-building frameworks: imperative and declarative
  • App Store is the only official distribution channel with mandatory moderation
  • App Sandbox is a security model isolating each app in a separate container

What is iOS?

iOS is Apple's mobile operating system, first released in 2007 alongside the original iPhone. The system is built on the XNU microkernel, a hybrid kernel combining components from Mach and FreeBSD. Unlike Android, iOS is a closed platform: app installation is only possible through the App Store, and the system source code is not available.

Apple controls both hardware and software, ensuring a high level of optimization. According to StatCounter (2026), iOS holds about 28% of the global mobile OS market share and exceeds 50% in the US and Japan.

The system uses the App Sandbox model — each app runs in an isolated environment and cannot access other apps' data without explicit user permission through system dialogs.

iOS Version History

The first version, iPhone OS 1.0, did not support third-party apps. The App Store arrived with iOS 2.0 in 2008. Key milestones: iOS 4 (multitasking), iOS 7 (flat design), iOS 10 (iMessage Apps), iOS 14 (desktop widgets), iOS 17 (StandBy mode). Each major release brings new APIs and frameworks.

iOS VersionYearKey Innovation
iPhone OS 12007First version, no App Store
iOS 22008App Store, third-party apps
iOS 42010Multitasking, FaceTime
iOS 72013Complete interface redesign
iOS 102016iMessage Apps, SiriKit
iOS 142020Widgets, App Library, Picture in Picture
iOS 172023StandBy, NameDrop, Live Voicemail

iOS Architecture: Four System Layers

The iOS architecture consists of four abstract layers, each providing APIs for the layer above. The lower layers are the kernel and system services, the upper layers are user-facing frameworks.

Cocoa Touch — Top Layer

Cocoa Touch is the framework layer for building user interfaces. It includes UIKit, SwiftUI, Foundation, MapKit, NotificationCenter and other APIs that developers work with directly. UIKit provides UIViewController, UIView, UIWindow and all visual components.

Media — Graphics and Sound

The Media layer includes Core Graphics, Core Animation, Core Image, AVFoundation and Metal. Metal is a low-level GPU API delivering high graphics performance in games and augmented reality apps. Core Animation manages hardware-accelerated animations at the layer level.

Core Services — System Services

Core Services includes Core Data, CloudKit, Core Location, HealthKit, Core Motion and Network. CFNetwork is a low-level C interface for working with network protocols. Foundation is an object-oriented wrapper over Core Foundation with NSString, NSArray, NSDictionary classes.

Core OS — Kernel and Security

The bottom layer includes the XNU kernel, the APFS file system, cryptographic modules (CommonCrypto, Security.framework), power management and device drivers. The Secure Enclave operates at this level — a coprocessor for storing biometric data and encryption keys.

objective-c
// Secure Enclave integrity check via Security framework
#import <LocalAuthentication/LocalAuthentication.h>

LAContext *context = [[LAContext alloc] init];
NSError *error = nil;

if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
                          error:&error]) {
    NSLog(@"Secure Enclave available for biometrics");
} else {
    NSLog(@"Secure Enclave unavailable: %@", error.localizedDescription);
}

Swift — The Primary Language for iOS Development

Swift is a programming language introduced by Apple in 2014 as a replacement for Objective-C. It was created by Chris Lattner at Apple. Swift combines the syntax of modern languages (Rust, Kotlin, C#) with C-level performance. According to TIOBE (2026), Swift ranks in the top 15 programming languages.

Key Features of Swift

Swift uses Automatic Reference Counting (ARC) for memory management without a garbage collector. Protocol-Oriented Programming (POP) allows extending types through protocol extensions. Optionals provide type-safe nil handling, and pattern matching simplifies branching logic.

swift
import UIKit

/// Protocol for data loading service
protocol DataServiceProtocol {
    associatedtype T
    func fetch(completion: @escaping (Result<[T], Error>) -> Void)
}

/// Service implementation for loading users
final class UserService: DataServiceProtocol {
    typealias T = User

    private let session: URLSession
    private let decoder: JSONDecoder

    init(session: URLSession = .shared, decoder: JSONDecoder = JSONDecoder()) {
        self.session = session
        self.decoder = decoder
    }

    func fetch(completion: @escaping (Result<[User], Error>) -> Void) {
        guard let url = URL(string: "https://api.example.com/users") else {
            completion(.failure(URLError(.badURL)))
            return
        }

        session.dataTask(with: url) { [weak self] data, response, error in
            guard let self, let data = data else {
                completion(.failure(error ?? URLError(.badServerResponse)))
                return
            }
            do {
                let users = try self.decoder.decode([User].self, from: data)
                completion(.success(users))
            } catch {
                completion(.failure(error))
            }
        }.resume()
    }
}

struct User: Codable, Identifiable {
    let id: Int
    let name: String
    let email: String
}

The example shows a data loading service implementation using Swift Concurrency (async/await), a protocol with associatedtype, and Codable for JSON decoding. ARC automatically manages memory, and weak self prevents strong reference cycles in closures.

Swift Concurrency: async/await and Actors

Since iOS 13, Swift supports built-in asynchrony through async/await and Actors — thread-safe types that protect state from data races. DispatchQueue for multithreading is gradually being replaced by async/await and Task structures.

swift
actor UserRepository {
    private var cache: [Int: User] = [:]
    private let service = UserService()

    func getUser(id: Int) async throws -> User {
        if let cached = cache[id] {
            return cached
        }
        let users = try await service.fetchAsync()
        guard let user = users.first(where: { $0.id == id }) else {
            throw UserError.notFound
        }
        cache[id] = user
        return user
    }
}

The UserRepository actor ensures that cache access happens on a single thread, eliminating race conditions. The compiler checks isolation at build time — accessing an actor's mutable property is only possible through await.

Xcode and Developer Tools

Xcode is Apple's integrated development environment (IDE), available exclusively on macOS. It includes a code editor, Interface Builder for visual layout, device simulator, Instruments for profiling, and the LLDB debugger. Xcode 15 supports Swift 5.9 with macros.

Interface Builder and Storyboards

Interface Builder lets you create interfaces via drag-and-drop with automatic XML description generation (XIB/Storyboard). Storyboards describe screen flows. Since 2023, Apple recommends SwiftUI Preview as the primary visual development tool, though Interface Builder remains in UIKit projects.

Debugging and Profiling Tools

Xcode Instruments includes dozens of templates: Time Profiler (CPU analysis), Allocations (memory), Leaks, Core Animation (FPS), Network and Energy Log. The Metal Debugger lets you inspect GPU calls and shaders. LLDB is a console debugger with Swift expression support and conditional breakpoints.

Key iOS Development Frameworks

The iOS SDK includes hundreds of frameworks. Below are the key ones every iOS developer works with daily.

FrameworkPurpose
UIKitInterface: UIView, UIViewController, animations, gestures
SwiftUIDeclarative interface with reactive updates
FoundationBasic types: String, Data, URLSession, JSONEncoder
Core DataORM for local data storage in SQLite
CloudKitiCloud sync and server-side logic without a backend
Core LocationGeolocation: GPS, geofencing, iBeacon
MapKitApple Maps display, annotations, routes
AVFoundationAudio/video capture and playback
MetalLow-level graphics and GPGPU computing
Core MLOn-device machine learning with on-device inference
PushKit / UserNotificationsPush notifications, VoIP, content updates

Core Data: Working with Local Data

Core Data is a framework for managing the object data model. It allows saving, loading and syncing objects between the UI thread and background contexts. iOS 17 introduced SwiftData — a modern wrapper over Core Data with Swift Macros support.

UIKit vs SwiftUI: Approach Comparison

The choice between UIKit and SwiftUI is a key architectural decision when starting iOS development. UIKit has existed since 2007 and supports all iOS versions. SwiftUI was introduced in 2019 and requires iOS 13+.

CriterionUIKitSwiftUI
ParadigmImperative (MVC, MVVM)Declarative (State-driven)
Minimum iOSiOS 2.0+iOS 13.0+
LayoutAuto Layout in code or Interface BuilderModifier chain, HStack/VStack/ZStack
CustomizationFull (CALayer, drawRect)Limited by modifiers
PerformanceHigh (manual optimization)Automatic invalidation
PreviewNot supportedReal-time Xcode Preview
TestingXCTest + Snapshot testsXCTest + Preview tests

In practice, most commercial projects use a hybrid approach: SwiftUI for new screens and simple forms, UIKit for complex custom components requiring fine rendering control. Apple is actively investing in SwiftUI, and it is expected to become the primary framework by 2028.

iOS App Lifecycle

Each iOS app goes through five states managed by UIApplication and AppDelegate. In SwiftUI, this role is handled by the App Protocol with the @main attribute.

App States

Not running — the app is not launched or was terminated by the system. Inactive — the app is in the foreground but not receiving events (e.g., during an incoming call). Active — normal state, the app receives touch events. Background — the app is minimized, performing background tasks. Suspended — the app is in memory but not executing code.

swift
import SwiftUI

@main
struct MyApp: App {
    @Environment(\.scenePhase) private var scenePhase

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        .onChange(of: scenePhase) { oldPhase, newPhase in
            switch newPhase {
            case .active:
                print("App became active")
            case .inactive:
                print("App is inactive")
            case .background:
                print("App went to background")
            @unknown default:
                break
            }
        }
    }
}

The system may terminate the app in the background when memory is low. Developers should save state in onDisappear or through ScenePhase.background so that users don't lose data when switching between apps.

App Store: Publishing and Requirements

The App Store is the only official app marketplace for iOS. Publishing requires an Apple Developer Program subscription ($99/year). Each app undergoes moderation — automated (static binary analysis) and manual (interface and content review).

Publishing Process

The developer builds an archive in Xcode and uploads it via Transporter or Xcode Organizer to App Store Connect. Average moderation time is 24–48 hours. App Review checks compliance with guidelines: data security, performance, HIG design, absence of hidden functionality.

App Review Requirements

Special attention is given to privacy: all types of data collection must be declared in the Privacy Manifest. Since 2025, Apple requires specifying reasons for API usage (NSPrivacyAccessedAPITypes). Apps using trackers without user consent are denied publication.

RequirementDescription
Privacy ManifestDeclaration of all collected data and collection purposes
HIG ComplianceConformance to Apple Human Interface Guidelines
StabilityNo crashes during moderation
Sandbox RulesAccess only to permitted resources
iCloud EntitlementsCorrect iCloud Container configuration

Frequently Asked Questions

What languages are used for iOS development?

The primary language is Swift. Objective-C is also supported but is mainly used in legacy projects. Swift is a modern type-safe language introduced by Apple in 2014. Since 2020, Apple recommends Swift as the sole language for new projects.

Which should I choose: UIKit or SwiftUI?

UIKit is a mature framework with maximum customization, suitable for complex interfaces. SwiftUI is a declarative framework for iOS 13+, speeding up development by 2–3 times. Most projects use both approaches through UIViewRepresentable and UIHostingController.

How much does it cost to publish on the App Store?

The Apple Developer Program annual subscription costs $99 for individual developers and $299 for organizations. Publishing is not possible without the subscription. The App Store commission is 15–30% of sales depending on the developer's annual revenue.

What is the minimum iOS version for SwiftUI?

SwiftUI is available from iOS 13 (2019). However, to use all features including NavigationStack, Observable Macro and SwiftData, iOS 17 and Xcode 15 are required. Support for older versions limits SwiftUI functionality.

What is App Sandbox in iOS?

App Sandbox is a security model that restricts an app's access to the file system, other apps' data, and system resources. Each app runs in an isolated container. Access to contacts, photos, microphone requires explicit permission through a system dialog.

Summary

  • iOS is a closed mobile OS with the XNU kernel, app sandboxing, and mandatory App Store moderation
  • Swift is a modern language for iOS development with ARC, protocol-oriented programming and async/await
  • iOS Architecture includes four layers: Cocoa Touch, Media, Core Services, Core OS
  • Xcode is the only development environment, featuring a simulator, Instruments and the LLDB debugger
  • UIKit and SwiftUI are two interface approaches — imperative and declarative, often used together
  • App Store requires a Developer Program subscription, Privacy Manifest and moderation
  • iOS Security is provided by Secure Enclave, Sandbox and mandatory data encryption

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also