Skip to content

Commit

Permalink
Release 5.2.0 (#377)
Browse files Browse the repository at this point in the history
* added of devices that support 5G network

* fixed device list

* updated Device.swift.gyb file

* add Dynamic Island support

* add test

* Add hasUSBCConnectivity support

* Add test for 5g support.

* Remove trailing comma.

* Add changelog entry.

* Version bump. (v5.2.0)

* Remove trailing whitespace.

* Update changelog with SwiftUI fix already merged to master.

* Remove trailing whitespace.

---------

Co-authored-by: furiosFast <furios.fast@hotmail.it>
Co-authored-by: 417-72KI <417.72ki@gmail.com>
Co-authored-by: Mathieu Hausherr <mhausherr@gmail.com>
  • Loading branch information
4 people authored Jan 15, 2024
1 parent 4cc2dff commit 572fd03
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 111 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## Version 5.2.0

Releasedate: 2024-01-15

```ruby
pod 'DeviceKit', '~> 5.2'
```

### New features

- Add `.hasUSBCConnectivity` to `Device` to indicate whether the device has an USB-C port. ([#373](https://github.com/devicekit/DeviceKit/pull/373))
- Add `.hasDynamicIsland` to `Device` to indicate whether the device has a dynamic island. ([#368](https://github.com/devicekit/DeviceKit/pull/368))
- Add `.has5gSupport` to `Device` to indicate whether the device has 5G support. ([#340](https://github.com/devicekit/DeviceKit/pull/340))
- Added Privacy Manifest to DeviceKit. ([#367](https://github.com/devicekit/DeviceKit/pull/367))
- Fix compilation issues when building SwiftUI Previews for macOS. ([#376](https://github.com/devicekit/DeviceKit/pull/376))

### Contributors

Thanks to all the contributers of this release!
- [mhausherr](https://github.com/mhausherr)
- [417-72KI](https://github.com/417-72KI)
- [furiosFast](https://github.com/furiosFast)
- [DenTelezhkin](https://github.com/DenTelezhkin)
- [honghaoz](https://github.com/honghaoz)

## Version 5.1.0

Releasedate: 2023-09-21
Expand Down
2 changes: 1 addition & 1 deletion DeviceKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'DeviceKit'
s.version = '5.1.0'
s.version = '5.2.0'
s.summary = 'DeviceKit is a µ-framework that provides a value-type replacement of UIDevice.'

s.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions DeviceKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 5.1.0;
MARKETING_VERSION = 5.2.0;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = me.dennisweissmann.DeviceKit;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -441,7 +441,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 5.1.0;
MARKETING_VERSION = 5.2.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = me.dennisweissmann.DeviceKit;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

`DeviceKit` is a value-type replacement of [`UIDevice`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/).

## Current version 5.1.0
## Current version 5.2.0
See our detailed [changelog](CHANGELOG.md) for the latest features, improvements and bug fixes.

## Features
Expand Down Expand Up @@ -52,7 +52,7 @@ DeviceKit can be installed in various ways.

#### Swift 5
```ruby
pod 'DeviceKit', '~> 5.1'
pod 'DeviceKit', '~> 5.2'
```
#### iOS 8.0 support
```ruby
Expand Down
30 changes: 30 additions & 0 deletions Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,16 @@ public enum Device {
return isOneOf(Device.allDevicesWithRoundedDisplayCorners) || isOneOf(Device.allDevicesWithRoundedDisplayCorners.map(Device.simulator))
}

/// All devices that have the Dynamic Island.
public static var allDevicesWithDynamicIsland: [Device] {
return [.iPhone14Pro, .iPhone14ProMax, .iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax]
}

/// Returns whether or not the device has the Dynamic Island.
public var hasDynamicIsland: Bool {
return isOneOf(Device.allDevicesWithDynamicIsland) || isOneOf(Device.allDevicesWithDynamicIsland.map(Device.simulator))
}

/// All devices that have 3D Touch support.
public static var allDevicesWith3dTouchSupport: [Device] {
return [.iPhone6s, .iPhone6sPlus, .iPhone7, .iPhone7Plus, .iPhone8, .iPhone8Plus, .iPhoneX, .iPhoneXS, .iPhoneXSMax]
Expand All @@ -1069,6 +1079,16 @@ public enum Device {
return isOneOf(Device.allDevicesWithWirelessChargingSupport) || isOneOf(Device.allDevicesWithWirelessChargingSupport.map(Device.simulator))
}

/// All devices that support 5G.
public static var allDevicesWith5gSupport: [Device] {
return [.iPhone12, .iPhone12Mini, .iPhone12Pro, .iPhone12ProMax, .iPhone13, .iPhone13Mini, .iPhone13Pro, .iPhone13ProMax, .iPhoneSE3, .iPhone14, .iPhone14Plus, .iPhone14Pro, .iPhone14ProMax, .iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax, .iPad10, .iPadAir5, .iPadMini6, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6]
}

/// Returns whether or not the device has 5G support.
public var has5gSupport: Bool {
return isOneOf(Device.allDevicesWith5gSupport) || isOneOf(Device.allDevicesWith5gSupport.map(Device.simulator))
}

/// All devices that have a LiDAR sensor.
public static var allDevicesWithALidarSensor: [Device] {
return [.iPhone12Pro, .iPhone12ProMax, .iPhone13Pro, .iPhone13ProMax, .iPhone14Pro, .iPhone14ProMax, .iPhone15Pro, .iPhone15ProMax, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6]
Expand All @@ -1078,6 +1098,16 @@ public enum Device {
public var hasLidarSensor: Bool {
return isOneOf(Device.allDevicesWithALidarSensor) || isOneOf(Device.allDevicesWithALidarSensor.map(Device.simulator))
}

/// All devices that have a USB-C connectivity.
public static var allDevicesWithUSBCConnectivity: [Device] {
return [.iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax, .iPad10, .iPadAir4, .iPadAir5, .iPadMini6, .iPadPro11Inch, .iPadPro12Inch3, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6]
}

/// Returns whether or not the device has a USB-C power supply.
public var hasUSBCConnectivity: Bool {
return isOneOf(Device.allDevicesWithUSBCConnectivity) || isOneOf(Device.allDevicesWithUSBCConnectivity.map(Device.simulator))
}
#elseif os(tvOS)
/// All TVs
public static var allTVs: [Device] {
Expand Down
Loading

0 comments on commit 572fd03

Please sign in to comment.