Alex Hofsteede
Alex Hofsteede

Reputation: 251

How to get the Apple Watch hardware identifier?

This page http://theiphonewiki.com/wiki/Models seems to suggest that the identifiers for the new apple watches are "Watch 1,1" and "Watch 1,2"

Does anyone know how to get this identifier in code for a connected watch? [WKInterfaceDevice currentDevice] seems to only give me the screen bounds.

Upvotes: 3

Views: 470

Answers (1)

Mike Swanson
Mike Swanson

Reputation: 3347

There is no WatchKit method to obtain the hardware identifier. To distinguish between the 38mm and 42mm Watches, an Apple employee in the dev forums recommended using the screenBounds property on WKInterfaceDevice. Something like this:

if ([WKInterfaceDevice currentDevice].screenBounds.size.width == 136.0f) {
    // 38mm
}
else {
    // 42mm
}

Upvotes: 2

Related Questions