Checking out Apple Watch Size!

I’d like to distinguish Apple Watch Size.

 

This code below is working.

let currentDevice = WKInterfaceDevice.currentDevice()
let bounds = currentDevice.screenBounds
// 38mm: (0.0, 0.0, 136.0, 170.0)
// 42mm: (0.0, 0.0, 156.0, 195.0)
if bounds.width > 136.0 {
    println("This is the big watch")
} else {
    println("This is the small watch")
}

However the code below does not work properly unfortunately.

let currentDevice = WKInterfaceDevice.currentDevice()
let sizeCategory = currentDevice.preferredContentSizeCategory
if sizeCategory == "UICTContentSizeCategoryL" {
    println("This is the big watch")
}
if sizeCategory == "UICTContentSizeCategoryS" {
    println("This is the small watch")
}

 

Thanks to Natasha the robot.
ref: https://www.natashatherobot.com/watchkit-check-device-screen-size-in-code/