Repository navigation
Version 2.0
Version 2.0 release 🎉
Thank you to all the contributors who made this release happen 💕 and a special thank you to @Zandor300 for all his effort and working closely with me to release this version 😊.
Breaking changes
- The original
Device()constructor has been made private in favour of usingDevice.currentto matchUIDevice.current. - The enum values for the iPhone Xs, iPhone Xs Max and iPhone Xʀ have been renamed to be
.iPhoneXS,.iPhoneXSMaxand.iPhoneXRto match proper formatting. .descriptionfor the iPhone Xs, iPhone Xs Max and iPhone Xʀ have been changed to contain small caps formatting for the s and the ʀ part..descriptionfor the iPad 5 and iPad 6 have been changed to the proper names; iPad (5th generation) and iPad (6th generation)..name,.systemName,.systemVersion,.model,.localizedModel,.batteryStateand.batteryLevelwill now all return nil when you try to get its value when the device you are getting it from isn't the current one. (eg.Device.iPad6.namewhile running on iPad 5)
New features
- Updated to Swift 5!
- New
.allDevicesWithRoundedDisplayCornersand.hasRoundedDisplayCornersvalues to check if a device has rounded display corners. (eg. iPhone Xs and iPad Pro (3rd generation)) - new
.allDevicesWithSensorHousingand.hasSensorHousingvalues to check if a device has a screen cutout for the sensor housing. (eg. iPhone Xs)
Bugfixes
.isPadand.isPhoneare now giving correct outputs again.