Fix iPhone Air camera specification to wide-only (#477)

* Initial plan

* Fix: Remove ultra-wide camera marking from iPhone Air

The iPhone Air only has a 48MP Fusion Main camera (wide), not an
ultra-wide camera. Changed camera value from 13 (wide + ultraWide) to
1 (wide only) in Device.swift.gyb and regenerated Device.generated.swift.

Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>

* Rebase on master and regenerate using new GYB instructions

Updated to use the new GYB command:
./Utils/gyb --line-directive '' -o ./Source/Device.generated.swift ./Source/Device.swift.gyb

Fix remains: iPhone Air camera value changed from 13 to 1 (wide only).

Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>

* Remove __pycache__ and add to .gitignore

Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>

* Add changelog entry for iPhone Air camera fix

Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>

* Move changelog entry to new Unreleased section

Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>
This commit is contained in:
Copilot
2025-12-02 14:35:24 +01:00
committed by GitHub
parent 47f838f1f5
commit 3631219f12
4 changed files with 10 additions and 3 deletions
+1
View File
@@ -45,3 +45,4 @@ vendor
## Generated Files
# *.generated.swift # we have to check it in because of CocoaPods ...
__pycache__/
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## Unreleased
### Bug fixes
- Fixed iPhone Air incorrectly marked as having ultra-wide camera. ([#463](https://github.com/devicekit/DeviceKit/issues/463))
## Version 5.7.0
Releasedate: 2025-09-12
+2 -2
View File
@@ -2261,6 +2261,7 @@ extension Device {
case .iPhoneSE2: return [.wide]
case .iPhoneSE3: return [.wide]
case .iPhone16e: return [.wide]
case .iPhoneAir: return [.wide]
case .iPad2: return [.wide]
case .iPad3: return [.wide]
case .iPad4: return [.wide]
@@ -2312,7 +2313,6 @@ extension Device {
case .iPhone16: return [.wide, .ultraWide]
case .iPhone16Plus: return [.wide, .ultraWide]
case .iPhone17: return [.wide, .ultraWide]
case .iPhoneAir: return [.wide, .ultraWide]
case .iPadPro11Inch2: return [.wide, .ultraWide]
case .iPadPro12Inch4: return [.wide, .ultraWide]
case .iPadPro11Inch3: return [.wide, .ultraWide]
@@ -2360,7 +2360,7 @@ extension Device {
/// All devices that feature an ultra wide camera
public static var allDevicesWithUltraWideCamera: [Device] {
return [.iPhone11, .iPhone11Pro, .iPhone11ProMax, .iPhone12, .iPhone12Mini, .iPhone12Pro, .iPhone12ProMax, .iPhone13, .iPhone13Mini, .iPhone13Pro, .iPhone13ProMax, .iPhone14, .iPhone14Plus, .iPhone14Pro, .iPhone14ProMax, .iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax, .iPhone16, .iPhone16Plus, .iPhone16Pro, .iPhone16ProMax, .iPhone17, .iPhone17Pro, .iPhone17ProMax, .iPhoneAir, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6]
return [.iPhone11, .iPhone11Pro, .iPhone11ProMax, .iPhone12, .iPhone12Mini, .iPhone12Pro, .iPhone12ProMax, .iPhone13, .iPhone13Mini, .iPhone13Pro, .iPhone13ProMax, .iPhone14, .iPhone14Plus, .iPhone14Pro, .iPhone14ProMax, .iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax, .iPhone16, .iPhone16Plus, .iPhone16Pro, .iPhone16ProMax, .iPhone17, .iPhone17Pro, .iPhone17ProMax, .iPadPro11Inch2, .iPadPro12Inch4, .iPadPro11Inch3, .iPadPro12Inch5, .iPadPro11Inch4, .iPadPro12Inch6]
}
/// Returns whether or not the current device has a camera
+1 -1
View File
@@ -94,7 +94,7 @@ iPhones = [
Device("iPhone17", "Device is an [iPhone 17]()", "", ["iPhone18,3"], 6.3, (9, 19.5), "iPhone 17", "iPhone 17", 460, False, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a19", True, True),
Device("iPhone17Pro", "Device is an [iPhone 17 Pro]()", "", ["iPhone18,1"], 6.3, (9, 19.5), "iPhone 17 Pro", "iPhone 17 Pro", 460, False, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a19Pro", True, True),
Device("iPhone17ProMax", "Device is an [iPhone 17 Pro Max]()", "", ["iPhone18,2"], 6.9, (9, 19.5), "iPhone 17 Pro Max", "iPhone 17 Pro Max", 460, True, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a19Pro", True, True),
Device("iPhoneAir", "Device is an [iPhone Air]()", "", ["iPhone18,4"], 6.5, (9, 19.5), "iPhone Air", "iPhone Air", 460, True, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a19Pro", True, True),
Device("iPhoneAir", "Device is an [iPhone Air]()", "", ["iPhone18,4"], 6.5, (9, 19.5), "iPhone Air", "iPhone Air", 460, True, False, False, True, False, True, True, True, True, True, 0, False, 1, False, "a19Pro", True, True),
]
iPads = [