Skip to content

Add iPhone 18 Pro, Pro Max, Apple Watch Series 12 and Ultra 4 support - #512

Open
Zandor300 wants to merge 2 commits into
masterfrom
t3code/add-apple-device-identifiers
Open

Zandor300 wants to merge 2 commits into
masterfrom
t3code/add-apple-device-identifiers

Conversation

@Zandor300

Copy link
Copy Markdown
Member

Adds automatic hardware detection for iPhone 18 Pro, iPhone 18 Pro Max, Apple Watch Series 12 (42mm/46mm), and Apple Watch Ultra 4. Adapts #507 while deferring iPhone Duo and its foldability API so the released models can ship independently.

Device Hardware identifiers
iPhone 18 Pro iPhone19,2
iPhone 18 Pro Max iPhone19,3, iPhone19,7
Apple Watch Series 12 42mm Watch8,2, Watch8,4
Apple Watch Series 12 46mm Watch8,3, Watch8,5
Apple Watch Ultra 4 Watch8,1

Replaces provisional identifiers and display metrics, adds A20 Pro/S11 CPU cases, and links each device to Apple's technical specifications: iPhone 18 Pro, iPhone 18 Pro Max, Series 12, and Ultra 4. Watch display diagonals are calculated from Apple's published pixel dimensions and PPI, rounded to two decimal places.

Identifier sources: IPSW.me device API and Apple device identifier reports, checked September 21, 2026. Unverified identifiers remain unknown. Generated Swift and regression coverage are updated; existing device definitions are preserved.

Validation:

  • iOS 26.2 simulator: 31 tests passed.
  • watchOS 26.2 simulator: 5 tests passed.
  • Swift package build and tests passed.
  • Generated Swift matches the GYB template; no duplicate identifiers; git diff whitespace check passed.
  • Changed tests pass SwiftLint. Full lint retains the existing complexity violation in the generated identifier switch, also present on the base branch.

Comment thread Tests/Tests.swift

#if os(iOS) || os(watchOS)
func testSeptember2026Devices() {
struct ExpectedDevice {

@github-actions github-actions Bot Sep 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Types should be nested at most 1 level deep
nesting Tests.swift:21

@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
8 Warnings
⚠️ Source/Device.generated.swift#L584 - Function should have complexity 10 or less: currently complexity equals 145
cyclomatic_complexity Device.generated.swift:584
⚠️ Source/Device.generated.swift#L740 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:740
⚠️ Source/Device.generated.swift#L1370 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1370
⚠️ Source/Device.generated.swift#L1646 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1646
⚠️ Source/Device.generated.swift#L1836 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1836
⚠️ Source/Device.generated.swift#L2006 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2006
⚠️ Source/Device.generated.swift#L2736 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2736
⚠️ Source/Device.generated.swift#L2800 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2800

SwiftLint found issues

Warnings

File Line Reason
Tests.swift 21 Types should be nested at most 1 level deep (nesting)
Device.generated.swift 740 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1370 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1646 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1836 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2006 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2736 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2800 TODOs should be resolved (Replace with proper implementa...). (todo)

Errors

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

Generated by 🚫 Danger

Adapt PR #507, excluding iPhone Duo and the foldability API. Replace provisional identifiers with researched hardware mappings, including both iPhone 18 Pro Max regional variants. Add Apple technical specification links, display metrics, and device mapping regression coverage.

Adapted from commit fe2c427.
@Zandor300
Zandor300 force-pushed the t3code/add-apple-device-identifiers branch from 6de9551 to 338c9e7 Compare September 21, 2026 09:47
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.

1 participant