
- iOS Tutorial
- iOS - Home
- iOS - Getting Started
- iOS - Environment Setup
- iOS - Objective-C Basics
- iOS - First iPhone Application
- iOS - Actions and Outlets
- iOS - Delegates
- iOS - UI Elements
- iOS - Accelerometer
- iOS - Universal Applications
- iOS - Camera Management
- iOS - Location Handling
- iOS - SQLite Database
- iOS - Sending Email
- iOS - Audio & Video
- iOS - File Handling
- iOS - Accessing Maps
- iOS - In-App Purchase
- iOS - iAd Integration
- iOS - GameKit
- iOS - Storyboards
- iOS - Auto Layouts
- iOS - Twitter & Facebook
- iOS - Memory Management
- iOS - Application Debugging
- iOS Useful Resources
- iOS - Quick Guide
- iOS - Useful Resources
- iOS - Discussion
How to detect iOS device UDID, Name, Version, Model by programmatically?
Device UDID stands for Unique device identifier. Every iOS Device has UDID which is a sequence of 40 letters and numbers that is guaranteed to be specific to your device.
Device name is generally a name which will find in the device Setting→ General→ About.
iOS Version is the version on which your current iPhone runs, latest iOS version in 12.2
iOS Model describes whether the iOS device which user is using is an iPhone/iPad.
Now will see how to detect UDID, Name, Version and Model programatically.
Open Xcode → New Project and add the below code in ViewController’s viewDidLoad method.
override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let udid = UIDevice.current.identifierForVendor?.uuidString let name = UIDevice.current.name let version = UIDevice.current.systemVersion let modelName = UIDevice.current.model print(udid ?? "") // D774EAE3F447445F9D5FE2B3B699ADB1 print(name) // iPhone XR print(version) // 12.1 print(modelName) // iPhone }
- Related Articles
- How to detect which iOS version is running on the device?
- How to lock & unlock the iOS device programmatically
- How to get device make and model on iOS?
- How to get programmatically android device name?
- How to get programmatically android device brand name?
- How to get programmatically android device broad name?
- How to get programmatically android version number?
- How to retrieve android API version programmatically?
- How to lock the Android device programmatically?
- How to get programmatically android Radio version information?
- How to lock Screen Orientation programmatically in iOS?
- How to programmatically take a screenshot on iOS?
- How to change screen brightness programmatically in iOS?
- How to answer incoming call programmatically in iOS?
- How to detect a long press in iOS?

Advertisements