Skip to content

Shmoopi/iOS-System-Services

Repository files navigation

iOS System Services

CocoaPods Swift Package Manager Platform Language License

One singleton. 70+ read-only properties. Everything you can know about an iOS device.

SystemServices is a lightweight Objective-C library that gathers hardware, network, battery, motion, disk, memory, processor, carrier, accessory, localization and application information behind a single, well-documented API — no boilerplate, no setup.

Hardware information Network information Memory information Disk information

Contents

Features

  • Single facade[SystemServices sharedServices] exposes everything.
  • Drop-in — install with CocoaPods, Swift Package Manager, or by copying the System Services folder.
  • One snapshotallSystemInformation returns a dictionary of (almost) everything in one call.
  • Up to date — device identifiers are mapped through the latest iPhone, iPad, iPod touch and Apple TV models.

Requirements

iOS 15.0+
Language Objective-C (ARC)
Xcode 15+

Installation

CocoaPods

Add to your Podfile:

pod 'SystemServices', '~> 3.0'

then run pod install.

Swift Package Manager

In Xcode: File → Add Package Dependencies… and enter

https://github.com/Shmoopi/iOS-System-Services.git

or add it to your Package.swift:

dependencies: [
    .package(url: "https://github.com/Shmoopi/iOS-System-Services.git", from: "3.0.0")
]

Manual

Drag the System Services folder into your project. The library uses AVFoundation, CoreTelephony, CoreMotion, ExternalAccessory, Security, UIKit and Foundation — all part of the iOS SDK.

Quick start

// Import System Services
#import "SystemServices.h"

// Read a single value
NSLog(@"Device model: %@", [SystemServices sharedServices].deviceModel);

// Or grab everything at once
NSLog(@"All system information: %@", [SystemServices sharedServices].allSystemInformation);

Using it from a Swift target? Add #import "SystemServices.h" to your bridging header (CocoaPods / manual) or import SystemServices (Swift Package Manager), then call SystemServices.shared().

API reference

All properties are readonly on [SystemServices sharedServices].

Hardware

Property Type Description
systemsUptime NSString * Uptime formatted as dd hh mm
deviceModel NSString * e.g. iPhone
deviceName NSString * User-assigned device name
systemName NSString * e.g. iOS
systemsVersion NSString * e.g. 18.0
systemDeviceTypeNotFormatted NSString * Raw identifier, e.g. iPhone17,1
systemDeviceTypeFormatted NSString * Friendly name, e.g. iPhone 16 Pro
screenWidth / screenHeight NSInteger Screen size in points
screenBrightness float 0–100
multitaskingEnabled BOOL
proximitySensorEnabled BOOL
debuggerAttached BOOL
pluggedIn BOOL
stepCountingAvailable BOOL
distanceAvailable BOOL
floorCountingAvailable BOOL

Jailbreak

Property Type Description
jailbroken int Non-NOTJAIL when the device appears jailbroken

Processor

Property Type Description
numberProcessors NSInteger
numberActiveProcessors NSInteger
processorsUsage NSArray * Per-core usage (0.0–1.0)

Accessories

Property Type Description
accessoriesAttached BOOL
headphonesAttached BOOL
numberAttachedAccessories NSInteger
nameAttachedAccessories NSString * Comma-separated

Carrier

Property Type Description
carrierName NSString *
carrierCountry NSString *
carrierMobileCountryCode NSString *
carrierISOCountryCode NSString *
carrierMobileNetworkCode NSString *
carrierAllowsVOIP BOOL

⚠️ Apple deprecated CTCarrier and stopped returning real carrier data to third-party apps in iOS 16; these properties now degrade to nil / placeholder values on modern systems. See Notes & limitations.

Battery

Property Type Description
batteryLevel float 0–100 (-1 if unavailable, e.g. on Simulator)
charging BOOL
fullyCharged BOOL

Network

Property Type Description
currentIPAddress NSString * Active interface IP
externalIPAddress NSString * Public IP (synchronous network call)
cellIPAddress / cellNetmaskAddress / cellBroadcastAddress NSString * Cellular interface
wiFiIPAddress / wiFiNetmaskAddress / wiFiBroadcastAddress / wiFiRouterAddress NSString * Wi-Fi interface
connectedToWiFi BOOL
connectedToCellNetwork BOOL

Process

Property Type Description
processID int

Disk

Property Type Description
diskSpace NSString * Total, human-readable
freeDiskSpaceinRaw / freeDiskSpaceinPercent NSString * Free space
usedDiskSpaceinRaw / usedDiskSpaceinPercent NSString * Used space
longDiskSpace / longFreeDiskSpace long long Raw byte counts

Memory

Property Type Description
totalMemory double Physical RAM (MB)
freeMemoryinRaw / freeMemoryinPercent double
usedMemoryinRaw / usedMemoryinPercent double
activeMemoryinRaw / activeMemoryinPercent double
inactiveMemoryinRaw / inactiveMemoryinPercent double
wiredMemoryinRaw / wiredMemoryinPercent double
purgableMemoryinRaw / purgableMemoryinPercent double

Accelerometer / Motion

Property Type Description
deviceOrientation UIInterfaceOrientation From the active window scene

SSAccelerometerInfo also offers instance methods (startLoggingMotionData / stopLoggingMotionData) for raw accelerometer, gyroscope and device-motion streams.

Localization

Property Type Description
country NSString * Locale identifier
language NSString * Preferred language
timeZoneSS NSString * System time zone name
currency NSString * Currency symbol

Application

Property Type Description
applicationVersion NSString * CFBundleShortVersionString
clipboardContent NSString * General pasteboard text (see privacy note)
applicationCPUUsage float This app's CPU usage

Identifiers

Property Type Description
cfuuid NSString * A freshly generated CFUUID (random each call)

Everything at once

Property Type Description
allSystemInformation NSDictionary * Snapshot of (almost) every value as strings

Demo app

Open SystemServicesDemo/SystemServicesDemo.xcodeproj and run. The app shows the library output across four tabs — Hardware, Network, Memory and Disk — with a live pie chart and gauge.

cd SystemServicesDemo
xcodebuild -project SystemServicesDemo.xcodeproj \
  -scheme SystemServicesDemo \
  -sdk iphonesimulator \
  -destination 'platform=iOS Simulator,name=iPhone 16' \
  build CODE_SIGNING_ALLOWED=NO

Notes & limitations

  • Carrier dataCTCarrier and -subscriberCellularProvider were deprecated by Apple in iOS 12 and return placeholder values for third-party apps from iOS 16 onward. There is no replacement API; these properties return nil where data is unavailable.
  • Clipboard privacyclipboardContent reads the general pasteboard (which triggers the system paste notification on modern iOS). It is deliberately excluded from allSystemInformation so a bulk snapshot can't silently capture pasteboard contents.
  • Simulator — battery and some sensor APIs are unavailable on the Simulator and return sentinel values. Device-model detection uses SIMULATOR_MODEL_IDENTIFIER so the simulated model name is still reported correctly.
  • External IPexternalIPAddress performs a synchronous HTTPS request; call it from a background queue in production.

Contributing

Issues and pull requests are welcome — see CONTRIBUTING.md.

Credits

A big thank you to the makers of the components used by the demo app:

License

Released under the MIT License. Copyright © 2012–2026 Shmoopi LLC <shmoopillc@gmail.com>. See LICENSE for details.

About

iOS System Services is a class to gather all available information about a device.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages