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 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.
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 Version | Year | Key Innovation |
|---|---|---|
| iPhone OS 1 | 2007 | First version, no App Store |
| iOS 2 | 2008 | App Store, third-party apps |
| iOS 4 | 2010 | Multitasking, FaceTime |
| iOS 7 | 2013 | Complete interface redesign |
| iOS 10 | 2016 | iMessage Apps, SiriKit |
| iOS 14 | 2020 | Widgets, App Library, Picture in Picture |
| iOS 17 | 2023 | StandBy, NameDrop, Live Voicemail |
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 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.
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 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.
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.
// 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 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.
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.
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.
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.
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 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 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.
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.
The iOS SDK includes hundreds of frameworks. Below are the key ones every iOS developer works with daily.
| Framework | Purpose |
|---|---|
| UIKit | Interface: UIView, UIViewController, animations, gestures |
| SwiftUI | Declarative interface with reactive updates |
| Foundation | Basic types: String, Data, URLSession, JSONEncoder |
| Core Data | ORM for local data storage in SQLite |
| CloudKit | iCloud sync and server-side logic without a backend |
| Core Location | Geolocation: GPS, geofencing, iBeacon |
| MapKit | Apple Maps display, annotations, routes |
| AVFoundation | Audio/video capture and playback |
| Metal | Low-level graphics and GPGPU computing |
| Core ML | On-device machine learning with on-device inference |
| PushKit / UserNotifications | Push notifications, VoIP, content updates |
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.
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+.
| Criterion | UIKit | SwiftUI |
|---|---|---|
| Paradigm | Imperative (MVC, MVVM) | Declarative (State-driven) |
| Minimum iOS | iOS 2.0+ | iOS 13.0+ |
| Layout | Auto Layout in code or Interface Builder | Modifier chain, HStack/VStack/ZStack |
| Customization | Full (CALayer, drawRect) | Limited by modifiers |
| Performance | High (manual optimization) | Automatic invalidation |
| Preview | Not supported | Real-time Xcode Preview |
| Testing | XCTest + Snapshot tests | XCTest + 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.
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.
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.
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.
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).
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.
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.
| Requirement | Description |
|---|---|
| Privacy Manifest | Declaration of all collected data and collection purposes |
| HIG Compliance | Conformance to Apple Human Interface Guidelines |
| Stability | No crashes during moderation |
| Sandbox Rules | Access only to permitted resources |
| iCloud Entitlements | Correct iCloud Container configuration |
Frequently Asked Questions
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.
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.
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.
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.
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
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.
Read also