Skip to content

Commit 572fd03

Browse files
Zandor300furiosFast417-72KImhausherr
authored
Release 5.2.0 (#377)
* 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>
1 parent 4cc2dff commit 572fd03

7 files changed

Lines changed: 269 additions & 111 deletions

File tree

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## Version 5.2.0
4+
5+
Releasedate: 2024-01-15
6+
7+
```ruby
8+
pod 'DeviceKit', '~> 5.2'
9+
```
10+
11+
### New features
12+
13+
- Add `.hasUSBCConnectivity` to `Device` to indicate whether the device has an USB-C port. ([#373](https://github.com/devicekit/DeviceKit/pull/373))
14+
- Add `.hasDynamicIsland` to `Device` to indicate whether the device has a dynamic island. ([#368](https://github.com/devicekit/DeviceKit/pull/368))
15+
- Add `.has5gSupport` to `Device` to indicate whether the device has 5G support. ([#340](https://github.com/devicekit/DeviceKit/pull/340))
16+
- Added Privacy Manifest to DeviceKit. ([#367](https://github.com/devicekit/DeviceKit/pull/367))
17+
- Fix compilation issues when building SwiftUI Previews for macOS. ([#376](https://github.com/devicekit/DeviceKit/pull/376))
18+
19+
### Contributors
20+
21+
Thanks to all the contributers of this release!
22+
- [mhausherr](https://github.com/mhausherr)
23+
- [417-72KI](https://github.com/417-72KI)
24+
- [furiosFast](https://github.com/furiosFast)
25+
- [DenTelezhkin](https://github.com/DenTelezhkin)
26+
- [honghaoz](https://github.com/honghaoz)
27+
328
## Version 5.1.0
429

530
Releasedate: 2023-09-21

DeviceKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'DeviceKit'
3-
s.version = '5.1.0'
3+
s.version = '5.2.0'
44
s.summary = 'DeviceKit is a µ-framework that provides a value-type replacement of UIDevice.'
55

66
s.description = <<-DESC

DeviceKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
"@executable_path/Frameworks",
385385
"@loader_path/Frameworks",
386386
);
387-
MARKETING_VERSION = 5.1.0;
387+
MARKETING_VERSION = 5.2.0;
388388
MTL_ENABLE_DEBUG_INFO = YES;
389389
PRODUCT_BUNDLE_IDENTIFIER = me.dennisweissmann.DeviceKit;
390390
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -441,7 +441,7 @@
441441
"@executable_path/Frameworks",
442442
"@loader_path/Frameworks",
443443
);
444-
MARKETING_VERSION = 5.1.0;
444+
MARKETING_VERSION = 5.2.0;
445445
MTL_ENABLE_DEBUG_INFO = NO;
446446
PRODUCT_BUNDLE_IDENTIFIER = me.dennisweissmann.DeviceKit;
447447
PRODUCT_NAME = "$(TARGET_NAME)";

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

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

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

2424
## Features
@@ -52,7 +52,7 @@ DeviceKit can be installed in various ways.
5252

5353
#### Swift 5
5454
```ruby
55-
pod 'DeviceKit', '~> 5.1'
55+
pod 'DeviceKit', '~> 5.2'
5656
```
5757
#### iOS 8.0 support
5858
```ruby

Source/Device.generated.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,16 @@ public enum Device {
10491049
return isOneOf(Device.allDevicesWithRoundedDisplayCorners) || isOneOf(Device.allDevicesWithRoundedDisplayCorners.map(Device.simulator))
10501050
}
10511051

1052+
/// All devices that have the Dynamic Island.
1053+
public static var allDevicesWithDynamicIsland: [Device] {
1054+
return [.iPhone14Pro, .iPhone14ProMax, .iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax]
1055+
}
1056+
1057+
/// Returns whether or not the device has the Dynamic Island.
1058+
public var hasDynamicIsland: Bool {
1059+
return isOneOf(Device.allDevicesWithDynamicIsland) || isOneOf(Device.allDevicesWithDynamicIsland.map(Device.simulator))
1060+
}
1061+
10521062
/// All devices that have 3D Touch support.
10531063
public static var allDevicesWith3dTouchSupport: [Device] {
10541064
return [.iPhone6s, .iPhone6sPlus, .iPhone7, .iPhone7Plus, .iPhone8, .iPhone8Plus, .iPhoneX, .iPhoneXS, .iPhoneXSMax]
@@ -1069,6 +1079,16 @@ public enum Device {
10691079
return isOneOf(Device.allDevicesWithWirelessChargingSupport) || isOneOf(Device.allDevicesWithWirelessChargingSupport.map(Device.simulator))
10701080
}
10711081

1082+
/// All devices that support 5G.
1083+
public static var allDevicesWith5gSupport: [Device] {
1084+
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]
1085+
}
1086+
1087+
/// Returns whether or not the device has 5G support.
1088+
public var has5gSupport: Bool {
1089+
return isOneOf(Device.allDevicesWith5gSupport) || isOneOf(Device.allDevicesWith5gSupport.map(Device.simulator))
1090+
}
1091+
10721092
/// All devices that have a LiDAR sensor.
10731093
public static var allDevicesWithALidarSensor: [Device] {
10741094
return [.iPhone12Pro, .iPhone12ProMax, .iPhone13Pro, .iPhone13ProMax, .iPhone14Pro, .iPhone14ProMax, .iPhone15Pro, .iPhone15ProMax, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6]
@@ -1078,6 +1098,16 @@ public enum Device {
10781098
public var hasLidarSensor: Bool {
10791099
return isOneOf(Device.allDevicesWithALidarSensor) || isOneOf(Device.allDevicesWithALidarSensor.map(Device.simulator))
10801100
}
1101+
1102+
/// All devices that have a USB-C connectivity.
1103+
public static var allDevicesWithUSBCConnectivity: [Device] {
1104+
return [.iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax, .iPad10, .iPadAir4, .iPadAir5, .iPadMini6, .iPadPro11Inch, .iPadPro12Inch3, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6]
1105+
}
1106+
1107+
/// Returns whether or not the device has a USB-C power supply.
1108+
public var hasUSBCConnectivity: Bool {
1109+
return isOneOf(Device.allDevicesWithUSBCConnectivity) || isOneOf(Device.allDevicesWithUSBCConnectivity.map(Device.simulator))
1110+
}
10811111
#elseif os(tvOS)
10821112
/// All TVs
10831113
public static var allTVs: [Device] {

0 commit comments

Comments
 (0)