Detect the Apple device model, screen size and OS version in Swift or Objective-C
open sourceMITfree
SDVersion is a lightweight Cocoa library for Swift and Objective-C that tells you which device your app is running on, its screen size and the OS version. It covers iOS, iPadOS, watchOS, tvOS and macOS, from the iPhone 4 to the iPhone 16, Apple Watch to Series 10 and Ultra 2, Apple TV to 4K (3rd generation) and Macs through Apple silicon M4, and can tell when the screen is in display zoom mode.
Problems it solves
- find out which iPhone or iPad model my app is running on
- change my iOS layout by screen size without hard-coding device dimensions
- check the OS version and device in an Objective-C or Swift app
Features
- device model detection for iOS, iPadOS, watchOS, tvOS and macOS
- screen size detection
- display zoom mode check
- OS version comparisons
- Swift and Objective-C APIs, one library per platform
Alternatives
The same job
These do what SDVersion does.
