Ekhoo / Device

Light weight tool for detecting the current device and screen size written in swift.
MIT License
1.7k stars 202 forks source link

BUG: Device.Size: iPad mini 6th not handled #134

Open kunaljaypatel opened 4 months ago

kunaljaypatel commented 4 months ago

You have support for .iPadMini6 in the function, getVersion(code: String). But, you don't properly support in size(). It defaults to unknown. You need to add a case for the enum Size for 8.3 inches for the iPad mini 6th gen.

Additionally, the screenHeight switch in your size function needs a case for '1133' for the iPad mini 6th gen.

    static public func size() -> Size {
            let w: Double = Double(UIScreen.main.bounds.width)
            let h: Double = Double(UIScreen.main.bounds.height)
            let screenHeight: Double = max(w, h)

            switch screenHeight {
            ...
            // case: 1133 need to be handled. 
            }
            }
kishorepran commented 3 weeks ago

Hello @kunaljaypatel : in recent time many of our fellow developers have added new set of devices. can you please check if this bug still exists. if yes let me know here. I will try to look into it.