Skip to content

Commit 3631219

Browse files
CopilotZandor300
andauthored
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>
1 parent 47f838f commit 3631219

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ vendor
4545

4646
## Generated Files
4747
# *.generated.swift # we have to check it in because of CocoaPods ...
48+
__pycache__/

CHANGELOG.md

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

3+
## Unreleased
4+
5+
### Bug fixes
6+
7+
- Fixed iPhone Air incorrectly marked as having ultra-wide camera. ([#463](https://github.com/devicekit/DeviceKit/issues/463))
8+
39
## Version 5.7.0
410

511
Releasedate: 2025-09-12

Source/Device.generated.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,7 @@ extension Device {
22612261
case .iPhoneSE2: return [.wide]
22622262
case .iPhoneSE3: return [.wide]
22632263
case .iPhone16e: return [.wide]
2264+
case .iPhoneAir: return [.wide]
22642265
case .iPad2: return [.wide]
22652266
case .iPad3: return [.wide]
22662267
case .iPad4: return [.wide]
@@ -2312,7 +2313,6 @@ extension Device {
23122313
case .iPhone16: return [.wide, .ultraWide]
23132314
case .iPhone16Plus: return [.wide, .ultraWide]
23142315
case .iPhone17: return [.wide, .ultraWide]
2315-
case .iPhoneAir: return [.wide, .ultraWide]
23162316
case .iPadPro11Inch2: return [.wide, .ultraWide]
23172317
case .iPadPro12Inch4: return [.wide, .ultraWide]
23182318
case .iPadPro11Inch3: return [.wide, .ultraWide]
@@ -2360,7 +2360,7 @@ extension Device {
23602360

23612361
/// All devices that feature an ultra wide camera
23622362
public static var allDevicesWithUltraWideCamera: [Device] {
2363-
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]
2363+
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]
23642364
}
23652365

23662366
/// Returns whether or not the current device has a camera

Source/Device.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ iPhones = [
9494
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),
9595
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),
9696
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),
97-
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),
97+
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),
9898
]
9999

100100
iPads = [

0 commit comments

Comments
 (0)