Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

### New features

- Add `allDevicesWithEsimSupport` / `hasEsimSupport` and `allDevicesWithDualEsimSupport` / `hasDualEsimSupport`, including simulator support. Cover supported iPhones through iPhone 17e and iPads through iPad Air (M4) and iPad Pro (M5), exclude iPhone X, and document regional and Wi-Fi + Cellular limitations. ([#382](https://github.com/devicekit/DeviceKit/pull/382))

Thanks to [furiosFast](https://github.com/furiosFast) for the original eSIM support contribution!

### Maintenance

- Simplify GYB device definitions with named feature parameters and defaults for unsupported features, preserving the generated Swift output. ([#508](https://github.com/devicekit/DeviceKit/pull/508))
Expand Down
29 changes: 29 additions & 0 deletions Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,35 @@ public enum Device {
return isOneOf(Device.allDevicesWith5gSupport) || isOneOf(Device.allDevicesWith5gSupport.map(Device.simulator))
}

/// All iPhone and iPad models that support at least one active eSIM, including dual eSIM models.
///
/// Support varies by country, region, and carrier. For iPad, only Wi-Fi + Cellular variants
/// support eSIM. Device cases do not distinguish these variants, so membership describes
/// model capabilities and does not guarantee eSIM availability on a particular device.
/// See https://support.apple.com/en-us/109317 and https://support.apple.com/en-us/119592.
public static var allDevicesWithEsimSupport: [Device] {
return [.iPhoneXS, .iPhoneXSMax, .iPhoneXR, .iPhone11, .iPhone11Pro, .iPhone11ProMax, .iPhoneSE2, .iPhone12, .iPhone12Mini, .iPhone12Pro, .iPhone12ProMax, .iPhone13, .iPhone13Mini, .iPhone13Pro, .iPhone13ProMax, .iPhoneSE3, .iPhone14, .iPhone14Plus, .iPhone14Pro, .iPhone14ProMax, .iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax, .iPhone16, .iPhone16Plus, .iPhone16Pro, .iPhone16ProMax, .iPhone16e, .iPhone17, .iPhone17Pro, .iPhone17ProMax, .iPhoneAir, .iPhone17e, .iPadAir3, .iPad7, .iPad8, .iPad9, .iPad10, .iPadA16, .iPadAir4, .iPadAir5, .iPadAir11M2, .iPadAir13M2, .iPadAir11M3, .iPadAir13M3, .iPadAir11M4, .iPadAir13M4, .iPadMini5, .iPadMini6, .iPadMiniA17Pro, .iPadPro11Inch, .iPadPro12Inch3, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6, .iPadPro11M4, .iPadPro13M4, .iPadPro11M5, .iPadPro13M5]
}

/// Returns whether the device model supports eSIM. Simulators use their simulated model.
/// See `allDevicesWithEsimSupport` for regional and cellular-variant limitations.
public var hasEsimSupport: Bool {
return isOneOf(Device.allDevicesWithEsimSupport) || isOneOf(Device.allDevicesWithEsimSupport.map(Device.simulator))
}

/// All iPhone models that support two active eSIMs simultaneously.
/// Support varies by country, region, and carrier; model membership does not guarantee
/// eSIM availability on a particular device. These models also appear in `allDevicesWithEsimSupport`.
public static var allDevicesWithDualEsimSupport: [Device] {
return [.iPhone13, .iPhone13Mini, .iPhone13Pro, .iPhone13ProMax, .iPhoneSE3, .iPhone14, .iPhone14Plus, .iPhone14Pro, .iPhone14ProMax, .iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax, .iPhone16, .iPhone16Plus, .iPhone16Pro, .iPhone16ProMax, .iPhone16e, .iPhone17, .iPhone17Pro, .iPhone17ProMax, .iPhoneAir, .iPhone17e]
}

/// Returns whether the device model supports two active eSIMs simultaneously.
/// Simulators use their simulated model. See `allDevicesWithDualEsimSupport` for limitations.
public var hasDualEsimSupport: Bool {
return isOneOf(Device.allDevicesWithDualEsimSupport) || isOneOf(Device.allDevicesWithDualEsimSupport.map(Device.simulator))
}

/// All devices that have a LiDAR sensor.
public static var allDevicesWithALidarSensor: [Device] {
return [.iPhone12Pro, .iPhone12ProMax, .iPhone13Pro, .iPhone13ProMax, .iPhone14Pro, .iPhone14ProMax, .iPhone15Pro, .iPhone15ProMax, .iPhone16Pro, .iPhone16ProMax, .iPhone17Pro, .iPhone17ProMax, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6, .iPadPro11M4, .iPadPro13M4, .iPadPro11M5, .iPadPro13M5]
Expand Down
Loading