iOS
Tech Tips
Mobile Operating System
iPhone
Software Updates

How to check iOS version?

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

Checking the iOS version can mean two different things: checking it on the device as a user, or checking it in code as a developer. The first is done in Settings, while the second should usually be done with availability checks rather than manual version-string comparisons.

Checking on the Device

As a user, the normal path is:

  1. open Settings
  2. go to General
  3. tap About
  4. read iOS Version or Software Version

That shows the exact installed version and is the fastest answer for troubleshooting, support, or app compatibility questions.

If you also want to know whether the phone is behind on updates, check Settings > General > Software Update. The About screen tells you what is installed now, while Software Update tells you whether Apple is offering a newer release for that device.

Checking in Swift Code

As a developer, the preferred approach is usually availability checking:

swift
1if #available(iOS 17, *) {
2    print("Use the iOS 17 code path")
3} else {
4    print("Use a fallback")
5}

This is better than inspecting version strings manually because the compiler understands the availability boundary and helps guard newer APIs.

If You Really Need the Version String

Sometimes you do want the system version text:

swift
1import UIKit
2
3let version = UIDevice.current.systemVersion
4print(version)

That returns a string such as "17.5" or a similar installed version. It is useful for logging and diagnostics, but it is usually not the best primary control-flow tool for feature gating.

Why Availability Is Better

Version-string checks are brittle:

  • they compare strings rather than API availability
  • they can be easy to parse incorrectly
  • they duplicate logic the compiler already supports

For example, this is less ideal:

swift
if let version = Double(UIDevice.current.systemVersion), version >= 17.0 {
    print("Maybe safe")
}

The code may work for simple cases, but it is weaker than #available for real API gating.

Checking in Objective-C

If you are maintaining older Objective-C code, availability is still the modern pattern when possible. For runtime string access:

objective-c
NSString *version = [[UIDevice currentDevice] systemVersion];
NSLog(@"%@", version);

But again, reach for availability-based branching before manual version parsing whenever the goal is API safety.

User Troubleshooting Use Cases

Knowing the iOS version matters when:

  • an app requires a minimum OS version
  • you are checking whether a bug only happens on one release line
  • support staff asks for environment details
  • a device has not yet installed a security or feature update

In those cases, the Settings path is the most direct answer.

For developer support workflows, it also helps to record the device model and app version alongside the iOS version. A crash report that only says "it failed on iPhone" is much less actionable than one that records the exact OS release, hardware family, and app build.

That is one reason UIDevice.current.systemVersion still has value even when it should not drive feature gating. It is useful diagnostic metadata, especially when bug reports are coming from test devices running different simulator runtimes or staggered production rollouts.

Common Pitfalls

The biggest mistake in app code is using version strings for API checks when #available would be safer and clearer.

Another mistake is assuming the simulator version and device version are the same. They can differ, especially during development with multiple runtimes installed.

A third issue is comparing version strings lexicographically rather than numerically. String comparison can give incorrect ordering for dotted versions.

Summary

  • On a device, check Settings > General > About.
  • In Swift code, prefer #available(iOS ..., *) for feature gating.
  • Use UIDevice.current.systemVersion mainly for logging or diagnostics.
  • Avoid manual version parsing when the real goal is API availability.
  • Separate user-facing version checks from developer-facing runtime checks.

Course illustration
Course illustration

All Rights Reserved.