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

5G support #340

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
10 changes: 10 additions & 0 deletions Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,16 @@ public enum Device {
public var supportsWirelessCharging: Bool {
return isOneOf(Device.allDevicesWithWirelessChargingSupport) || isOneOf(Device.allDevicesWithWirelessChargingSupport.map(Device.simulator))
}

/// All devices that support 5G.
public static var allDevicesWith5gSupport: [Device] {
return [.iPhone12, .iPhone12Pro, .iPhone12ProMax, .iPhone12Mini, .iPhone13, .iPhone13Pro, .iPhone13ProMax, .iPhone13Mini, .iPhone14, .iPhone14Pro, .iPhone14ProMax, .iPhone14ProMax, .iPhoneSE3, .iPadAir5, .iPadMini6, .iPadPro11Inch3, .iPadPro11Inch4, .iPadPro12Inch5, .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] {
Expand Down
10 changes: 10 additions & 0 deletions Source/Device.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,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 [${', '.join(list(map(lambda device: "." + device.caseName, list(filter(lambda device: device.has5gSupport == True, iOSDevices)))))}]
}

/// 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 [${', '.join(list(map(lambda device: "." + device.caseName, list(filter(lambda device: device.hasLidarSensor == True, iOSDevices)))))}]
Expand Down