Skip to content

Instantly share code, notes, and snippets.

@harshalbhakta
Created February 22, 2021 06:53
Show Gist options
  • Save harshalbhakta/b62ac13dfbefa03ddd5082fc59f1195c to your computer and use it in GitHub Desktop.
Save harshalbhakta/b62ac13dfbefa03ddd5082fc59f1195c to your computer and use it in GitHub Desktop.
iOS Device Details
let currentDevice = UIDevice.current
print("name: \(currentDevice.name)")
print("systemName: \(currentDevice.systemName)")
print("systemVersion: \(currentDevice.systemVersion)")
print("model: \(currentDevice.model)")
print("localizedModel: \(currentDevice.localizedModel)")
print("userInterfaceIdiom: \(currentDevice.userInterfaceIdiom.rawValue)")
if let identifierForVendor = currentDevice.identifierForVendor {
print("identifierForVendor: \(identifierForVendor)")
} else {
print("identifierForVendor: -")
}
name: iPhone 12 Pro Max
systemName: iOS
systemVersion: 14.4
model: iPhone
localizedModel: iPhone
userInterfaceIdiom: 0
identifierForVendor: 0526F78D-561C-4284-B1C1-2DBEEC67A43B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment