Duplicate case value ‘UIUserInterfaceIdiomPad

react-native-device-info : “^7.3.1”,
Xcode Version 11.5 (11E608c)
React-Naitve version 0.63.3
iOS 13.0

Current behavior

When I build my app on Xcode, I receiver error “Duplicate case value ‘UIUserInterfaceIdiomPad’ ” at RNDeviceInfor.m line 116.
But it ok if I delete “case UIUserInterfaceIdiomMac: return DeviceTypeDesktop;” at this line.

Screen Shot 2021-01-14 at 15 39 36

Expected behavior

I don’t want to do this every time I install the project. How do I fix it?

Thanks and best regards

2 thoughts on “Duplicate case value ‘UIUserInterfaceIdiomPad

  1. Check release notes and changelog and search issues list prior to logging issues please
    Granted, this one was a gotcha. That version (and 8.x) require up to date Xcode i.e. 12
    If you develop for ios the general expectation is that you update your Xcode when they release it in order to support modern iOS versions
    If you don’t do that you are basically at your own risk, though I did not intend to break people on purpose.
    For Xcode 11 if you must stay on it for whatever reason, pin your version here to a prior version