Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.2.0 #377

Merged
merged 16 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1047,6 +1047,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 @@ -1067,6 +1077,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 {
Zandor300 marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -1076,6 +1096,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
Loading