Skip to the workspace
Pebellslearn by building
iOS Architecture  ›  Lesson

Core OS and Core Services

Core OS 12 miniOS is built in four layers, with Core OS handling the kernel, hardware and security and Core Services providing data, networking and location frameworks such as Foundation and Core Location.

ios / Core OS and Core Services

Explore each scene at your own pace.

01 · The rule

The rule

Core OS and Core Services

When TrailLog saves a hike, many things happen that you never write: a file is created on flash storage, it is encrypted, a GPS chip reports your position, a network socket uploads a backup. iOS organises all of that into layers, and knowing them tells you where to look for any capability.

The rule

Four layers, top to bottom: Cocoa Touch, Media, Core Services, Core OS.

Each layer builds on the ones beneath it. Your app mostly talks to the top, and the lower layers do the heavy lifting underneath.

Layer What lives there Examples
Cocoa Touch Screens, touches, app lifecycle UIKit, SwiftUI, notifications
Media Drawing, animation, images, sound, video Core Graphics, Core Animation, AVFoundation, Metal
Core Services Data, networking, location, system services Foundation, Core Data, Core Location, CloudKit
Core OS Kernel, hardware access, security Darwin kernel, file system, drivers, keychain services

This lesson covers the two bottom layers.

Core OS is the foundation shared with macOS: the Darwin kernel, memory and process management, the file system, low-level networking, drivers for hardware, and the security machinery (sandboxing, encryption, the Keychain). Apps rarely call it directly; it is what every higher framework ultimately stands on.

Core Services gives you the everyday building blocks that are not about the screen:

  • Foundation — strings, dates, numbers, collections, URLSession for networking, FileManager, JSONEncoder.
  • Core Data and SwiftData — storing object graphs on the device.
  • Core Location — the user's position.
  • CloudKit — syncing data through iCloud.
import Foundation
import CoreLocation

let saved = Date()                              // Foundation
let manager = CLLocationManager()               // Core Location
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.