DeviceKit v2.0.0 Release Notes

Release Date: 2019-04-10 // almost 5 years ago
  • ๐Ÿ”– 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 using Device.current to match UIDevice.current.
    • The enum values for the iPhone Xs, iPhone Xs Max and iPhone Xส€ have been renamed to be .iPhoneXS, .iPhoneXSMax and .iPhoneXR to match proper formatting.
    • .description for the iPhone Xs, iPhone Xs Max and iPhone Xส€ have been changed to contain small caps formatting for the s and the ส€ part.
    • .description for 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, .batteryState and .batteryLevel will 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.name while running on iPad 5)

    ๐Ÿ†• New features

    • โšก๏ธ Updated to Swift 5!
    • ๐Ÿ†• New .allDevicesWithRoundedDisplayCorners and .hasRoundedDisplayCorners values to check if a device has rounded display corners. (eg. iPhone Xs and iPad Pro (3rd generation))
    • ๐Ÿ†• new .allDevicesWithSensorHousing and .hasSensorHousing values to check if a device has a screen cutout for the sensor housing. (eg. iPhone Xs)

    ๐Ÿ›  Bugfixes

    • .isPad and .isPhone are now giving correct outputs again.