Skip to content

Add variable aperture device capability - #522

Closed
Zandor300 wants to merge 1 commit into
masterfrom
t3/add-action-button-detection
Closed

Zandor300 wants to merge 1 commit into
masterfrom
t3/add-action-button-detection

Conversation

@Zandor300

Copy link
Copy Markdown
Member

Adds Device.allDevicesWithVariableAperture, containing iPhone 18 Pro and iPhone 18 Pro Max, and hasVariableAperture for checking a model's capability. The instance property recognizes supported simulators and returns false for unsupported or unknown models.

The list is generated from per-device metadata in the GYB template, so future models can opt in. Includes regenerated Swift source, API documentation, an unreleased changelog entry, and regression coverage across all known devices, their simulators, and unknown devices.

Closes #516.

Validation:

  • Xcode 26.2: all 39 tests passed on the iPhone 17 Pro simulator running iOS 26.2.
  • swift test: all 6 macOS-applicable tests passed.
  • Regeneration matches the committed Swift source; git diff --check passes.
  • SwiftLint reports the same 10 pre-existing findings as the original generated source (one cyclomatic-complexity error and nine warnings), with no new findings.

@Zandor300 Zandor300 closed this Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
9 Warnings
⚠️ Source/Device.generated.swift#L588 - Function should have complexity 10 or less: currently complexity equals 146
cyclomatic_complexity Device.generated.swift:588
⚠️ Source/Device.generated.swift#L745 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:745
⚠️ Source/Device.generated.swift#L1390 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1390
⚠️ Source/Device.generated.swift#L1670 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1670
⚠️ Source/Device.generated.swift#L1861 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1861
⚠️ Source/Device.generated.swift#L2032 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2032
⚠️ Source/Device.generated.swift#L2776 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2776
⚠️ Source/Device.generated.swift#L2840 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2840
⚠️ Tests/Tests.swift#L80 - Types should be nested at most 1 level deep
nesting Tests.swift:80

SwiftLint found issues

Warnings

File Line Reason
Tests.swift 80 Types should be nested at most 1 level deep (nesting)
Device.generated.swift 745 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1390 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1670 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1861 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2032 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2776 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2840 TODOs should be resolved (Replace with proper implementa...). (todo)

Errors

File Line Reason
Device.generated.swift 588 Function should have complexity 10 or less: currently complexity equals 146 (cyclomatic_complexity)

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List of devices with a Variable Aperture

1 participant