iOS
iOS version
iPhone tips
iOS guide
Apple tutorial

How to check iOS version?

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

Introduction

Checking the iOS version can mean two different things: confirming the software version on a device for support or compatibility, or checking it in code so an app can gate features safely. Those use cases need different tools, and it helps to separate them instead of treating "version check" as one generic task.

Check the Version on the Device

For a person holding the iPhone or iPad, the fastest path is through Settings:

  1. Open Settings.
  2. Tap General.
  3. Tap About.
  4. Read iOS Version or Software Version.

This is the most useful method for support because it also exposes nearby details such as model name and model number. If you are helping a user remotely, asking for a screenshot of the About screen is often faster and more reliable than asking them to read the version aloud.

Patch-level information matters too. Two devices can both be on the same major iOS release while still differing in a way that affects a bug or security fix.

Check the Version From a Computer

If the device is connected to a computer, you can inspect the software version from there as well.

On recent macOS:

  • connect the device
  • open Finder
  • select the device in the sidebar
  • read the software version in the summary view

On Windows, the equivalent depends on the installed Apple tooling, but the same idea applies: connect the device, open the management app, and read the software version from the device summary.

This is useful in enterprise or IT workflows where device inventory and support happen from desktop machines rather than from the device UI.

In Swift, Prefer #available for Feature Gating

Inside an app, the preferred way to branch on OS support for APIs is #available. This is safer than manually parsing version strings because the compiler understands API availability.

swift
1import UIKit
2
3final class FeatureGate {
4    static func enableModernUI() {
5        if #available(iOS 17.0, *) {
6            print("Enable modern UI path")
7        } else if #available(iOS 15.0, *) {
8            print("Enable intermediate UI path")
9        } else {
10            print("Enable fallback UI path")
11        }
12    }
13}
14
15FeatureGate.enableModernUI()

Use this when the question is "may I call this API safely on the current OS."

Use UIDevice.current.systemVersion for Logging and Diagnostics

If you need the raw system version as a string, for example in telemetry or debugging output, use UIDevice.current.systemVersion.

swift
1import UIKit
2
3let versionString = UIDevice.current.systemVersion
4print("System version: \(versionString)")

This is good for diagnostics. It is less ideal for feature gating because string parsing is easy to get wrong and much less expressive than #available.

Parse Versions Carefully Only When You Truly Need To

Some non-API logic still needs numeric version comparisons, such as analytics bucketing or compatibility rules that are not tied directly to SDK availability. In those cases, parse components into integers instead of comparing strings lexicographically.

swift
1import Foundation
2
3func isAtLeast(_ required: String, current: String) -> Bool {
4    func parse(_ value: String) -> [Int] {
5        return value.split(separator: ".").map { Int($0) ?? 0 }
6    }
7
8    let a = parse(current)
9    let b = parse(required)
10    let count = max(a.count, b.count)
11
12    for i in 0..<count {
13        let left = i < a.count ? a[i] : 0
14        let right = i < b.count ? b[i] : 0
15        if left != right {
16            return left > right
17        }
18    }
19
20    return true
21}
22
23print(isAtLeast("16.4", current: "17.2"))
24print(isAtLeast("17.3", current: "17.2"))

This avoids classic mistakes such as treating "17.10" as less than "17.2" simply because string comparison does not understand version semantics.

Common Pitfalls

  • The most common mistake is using raw version strings for API gating when #available is the safer and clearer tool.
  • Another common issue is comparing version strings directly instead of parsing them numerically.
  • Developers also sometimes ask users only for the major iOS version during support, even when the build or patch level is the part that actually matters.

Summary

  • Check the device version in Settings, General, and About for user-facing support.
  • Use a connected computer when desktop-based auditing or support is more practical.
  • In Swift, use #available for safe API feature gating.
  • Use UIDevice.current.systemVersion for logging and diagnostics.
  • Parse numeric version components only when custom non-API logic truly requires it.

Related reading
Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

All Rights Reserved.