A Light Weight and Updated Code for Device Detection and many other functionality written in swift 2.0
#How To Use Just import the source file to your project and you are ready to go..
#Implementation #To Know the device type let device = Device ()
deviceType.text = "\(device)"
#To Know Device name deviceName.text = UIDevice.currentDevice().name
#To Know iOS Version iOSVersion.text = UIDevice.currentDevice().systemVersion
#To Check Battery Status device.batteryState == .Charging(65) Here "65" is the battery percentage to track For example if the device battery percentage is more then 90 Then graphic quality = HIGH
for reference see the code....