Latest 0.2.0
License MIT
Platforms ios 9.0, watchos 2.0, tvos 9.0

DeviceDetector able to detect device’s model and cellular type.

Supported devices:

  1. iPhone
  2. iPad
  3. AppleTV
  4. Apple Watch


Import module

import DeviceDetector

And then you can check current device directly in condition or switch-case

if .CDMA))
  print("is iPad2")

if DeviceDetector.device.younger(iPhoneModel.Model3G(cellularType: .CDMA))
  print("Current device is younger than iPhone 3G")

if case iPhoneModel.Model3G(cellularType: let cellular) = DeviceDetector.device, cellular == .GSM
    print("The device is iPhone 3G AND GSM")


DeviceDetector is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'DeviceDetector'

Alternatively, copy DeviceDetector folder . If you use this method, you can omit the line "import DeviceDetector" at the head of your file.


Alexander Zakatnov, [email protected]


DeviceDetector is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "DeviceDetector",
    "version": "0.2.0",
    "summary": "DeviceDetector lib for device's model detecting on Swift",
    "description": "DeviceDetecor library able to detect and compare the device model",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Zaakk": "[email protected]"
    "platforms": {
        "ios": "9.0",
        "watchos": "2.0",
        "tvos": "9.0"
    "source": {
        "git": "",
        "tag": "0.2.0"
    "source_files": "DeviceDetector/**/*.{h,m,swift}",
    "swift_version": "4.2"

Pin It on Pinterest

Share This