DeviceKit icon indicating copy to clipboard operation
DeviceKit copied to clipboard

Device.description returns wrong values

Open mklschreiber opened this issue 5 years ago • 2 comments

The current version returns different values for know devices. If I'm using an iPhone XR in combination with the API Device.description I'm getting the result "iPhone XR". If I'm using an iPhone 12 Pro the Device.description returns the value "iPhone13,3".

We checked the enum but didn't see the error. Could you please check it?

mklschreiber avatar Oct 21 '21 13:10 mklschreiber

That means that the library version that you are using doesn't have iPhone 12 Pro support. Which version of DeviceKit are you using? iPhone 12 series support was added in version 4.2.0, the latest version is 4.5.2.

pod 'DeviceKit', '~> 4.5'

Zandor300 avatar Oct 25 '21 12:10 Zandor300

we are using the version 4.5.1 which should support those models... I added a workaround in my project by checking your string for the pattern (iPhone|iPad)XX,X and then switching to the known cases provided by your enum. Therefore the devices are known for the lib but the value returned to our application is wrong...

mklschreiber avatar Oct 26 '21 13:10 mklschreiber