Skip to content

Add M5 iPad Pro models - #467

Merged
Zandor300 merged 3 commits into
masterfrom
copilot/add-m5-ipad-models
Dec 3, 2025
Merged

Add M5 iPad Pro models#467
Zandor300 merged 3 commits into
masterfrom
copilot/add-m5-ipad-models

Conversation

CopilotAI commented Nov 9, 2025

Copy link
Copy Markdown
Contributor

Plan: Add M5 iPad Pro Models ✅

Based on the issue requirements and exploration, here's the minimal-change plan:

  • Explore repository structure and understand device addition process
  • Add M5 CPU definition to Device.swift.gyb
  • Add 2 new M5 iPad Pro device entries to Device.swift.gyb:
    • iPad Pro 11-inch (M5) - covers Wi-Fi and Wi-Fi + Cellular variants via model identifiers
    • iPad Pro 13-inch (M5) - covers Wi-Fi and Wi-Fi + Cellular variants via model identifiers
  • Regenerate Device.generated.swift using gyb tool
  • Add unreleased changelog entry for M5 iPads
  • Add tests for M5 iPad Pro models
  • Verify all changes are correct
  • Run code review (no uncommitted changes to review)
  • Run CodeQL security check (no security issues, configuration-only changes)
  • Fix changelog year (2024 -> 2025)
  • Remove sourceLocation comments from generated file
  • Fix changelog format to match master's unreleased section
  • Remove Python warnings from generated Swift file

Summary

Successfully added support for M5 iPad Pro models announced by Apple on October 15, 2025:

Changes Made:

  1. Device.swift.gyb: Added M5 CPU definition and two M5 iPad Pro device entries
  2. Device.generated.swift: Regenerated with gyb tool using --line-directive '' flag and 2>/dev/null to remove sourceLocation comments and Python warnings
  3. CHANGELOG.md: Updated unreleased section following the format from master with proper "New devices" section and existing bug fixes
  4. Tests.swift: Added comprehensive tests for M5 CPU and device properties

Device Details:

  • iPad Pro 11-inch (M5): Model identifiers iPad17,3 (Wi-Fi) and iPad17,4 (Wi-Fi + Cellular)
  • iPad Pro 13-inch (M5): Model identifiers iPad17,5 (Wi-Fi) and iPad17,6 (Wi-Fi + Cellular)
  • CPU: M5 chip
  • Properties: Pro device, 5G support, LiDAR sensor, USB-C connectivity
  • Specs: Same physical dimensions and PPI as M4 models

Verification:

✅ Device cases properly defined
✅ Model identifiers correctly mapped
✅ M5 CPU definition added
✅ Included in allProDevices array
✅ 10 test assertions added
✅ Changelog updated with proper format matching master
✅ Python warnings removed from generated file
✅ All generated code validated
✅ No security issues detected

Original prompt

This section details on the original issue you should resolve

<issue_title>Add M5 iPad models</issue_title>
<issue_description>Apple released new 11- and 13-inch M5 iPad Pros on October 15. These should be added to DeviceKit.

Models:
iPad Pro 11-inch (M5) Wi-Fi
iPad Pro 13-inch (M5) Wi-Fi
iPad Pro 11-inch (M5) Wi-Fi + Cellular
iPad Pro 13-inch (M5) Wi-Fi + Cellular

Tech specs:
https://support.apple.com/en-us/125406</issue_description>

<agent_instructions>Also add unreleased changelog item. Use the build tool to generate the swift file. Only make manual edits to the gyb file.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Comment threadCHANGELOG.md Outdated
@github-actions

github-actionsBot commented Nov 9, 2025

Copy link
Copy Markdown
11 Warnings
⚠️Plist changed, don't forget to localize your plist values
⚠️Source/Device.generated.swift#L762 - TODOs should be resolved (Replace with proper implementa…).
todoDevice.generated.swift:762
⚠️Source/Device.generated.swift#L1347 - TODOs should be resolved (Replace with proper implementa…).
todoDevice.generated.swift:1347
⚠️Source/Device.generated.swift#L1615 - TODOs should be resolved (Replace with proper implementa…).
todoDevice.generated.swift:1615
⚠️Source/Device.generated.swift#L1797 - TODOs should be resolved (Replace with proper implementa…).
todoDevice.generated.swift:1797
⚠️Source/Device.generated.swift#L1959 - TODOs should be resolved (Replace with proper implementa…).
todoDevice.generated.swift:1959
⚠️Source/Device.generated.swift#L2672 - TODOs should be resolved (Replace with proper implementa…).
todoDevice.generated.swift:2672
⚠️Source/Device.generated.swift#L2734 - TODOs should be resolved (Replace with proper implementa…).
todoDevice.generated.swift:2734
⚠️Tests/Tests.swift#L469 - Collection literals should not have trailing commas.
trailing_commaTests.swift:469
⚠️Tests/Tests.swift#L539 - Collection literals should not have trailing commas.
trailing_commaTests.swift:539
⚠️Tests/Tests.swift#L546 - Function body should span 40 lines or less excluding comments and whitespace: currently spans 46 lines
function_body_lengthTests.swift:546

SwiftLint found issues

Warnings

FileLineReason
Tests.swift546Function body should span 40 lines or less excluding comments and whitespace: currently spans 46 lines (function_body_length)
Tests.swift469Collection literals should not have trailing commas. (trailing_comma)
Tests.swift504Collection literals should not have trailing commas. (trailing_comma)
Tests.swift539Collection literals should not have trailing commas. (trailing_comma)
Tests.swift590Collection literals should not have trailing commas. (trailing_comma)
Tests.swift680Collection literals should not have trailing commas. (trailing_comma)
Tests.swift723Collection literals should not have trailing commas. (trailing_comma)
Device.generated.swift762TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift1347TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift1615TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift1797TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift1959TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift2672TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift2734TODOs should be resolved (Replace with proper implementa...). (todo)

Generated by 🚫 Danger

CopilotAI changed the title [WIP] Add M5 iPad models to DeviceKitAdd M5 iPad Pro modelsNov 9, 2025
CopilotAI requested a review from Zandor300November 9, 2025 20:55
@Zandor300

Copy link
Copy Markdown
Member

@copilot Please remove all sourceLocation comments inside the generated Swift file.

CopilotAI commented Nov 19, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot Please remove all sourceLocation comments inside the generated Swift file.

Removed all sourceLocation comments in commit 5cb041a. Regenerated Device.generated.swift using --line-directive '' flag, reducing the file from 3,975 to 2,720 lines (1,257 lines removed).

Comment threadSource/Device.generated.swift Outdated
Comment threadTests/Tests.swift
Comment threadTests/Tests.swift
Comment threadTests/Tests.swift
Comment threadTests/Tests.swift

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for the new M5 iPad Pro models announced by Apple on October 15, 2025. The implementation follows the established pattern for adding new device support to DeviceKit.

Key Changes:

  • Added M5 CPU definition to the device library
  • Added two new M5 iPad Pro device models (11-inch and 13-inch) with their respective model identifiers
  • Added comprehensive test coverage for the new devices and CPU type

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

FileDescription
Source/Device.swift.gybTemplate file updated with M5 CPU definition and two M5 iPad Pro device entries (iPad17,3/4 for 11-inch and iPad17,5/6 for 13-inch)
Source/Device.generated.swiftGenerated Swift code from template including new device cases, model mappings, CPU definitions, and device array updates across all relevant collections
Tests/Tests.swiftAdded comprehensive test assertions covering CPU type, Pro device classification, 5G support, LiDAR sensor, and USB-C connectivity for both M5 iPad Pro models
CHANGELOG.mdAdded unreleased section documenting the October 2025 M5 iPad Pro additions with device names and case values

Comment threadSource/Device.generated.swift Outdated
@Zandor300

Copy link
Copy Markdown
Member

@copilot Rebase on master and add a changelog entry under existing unreleased. Example:

## Unreleased
### New devices
- Add support for Apple Watch SE (3rd generation) ([#473](https://github.com/devicekit/DeviceKit/issues/473))
| Device | Case value |
| --- | --- |
| Apple Watch SE (3rd generation) 40mm | `Device.appleWatchSE3_40mm` |
| Apple Watch SE (3rd generation) 44mm | `Device.appleWatchSE3_44mm` |
### Bug fixes
- Fixed iPhone Air incorrectly marked as having ultra-wide camera. ([#463](https://github.com/devicekit/DeviceKit/issues/463))

CopilotAI commented Dec 3, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot Rebase on master and add a changelog entry under existing unreleased. Example:

...

Fixed in commit 952d5d0. Updated CHANGELOG.md to follow the format from master with the existing "Bug fixes" section preserved and M5 iPad Pro entries added under "New devices" section with issue link (#465).

CopilotAIand others added 3 commits December 3, 2025 20:35
Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>
# Conflicts:
#	CHANGELOG.md
#	Source/Device.generated.swift
Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>
@Zandor300
Zandor300force-pushed the copilot/add-m5-ipad-models branch from 952d5d0 to 04479e3CompareDecember 3, 2025 19:38
@Zandor300
Zandor300 marked this pull request as ready for review December 3, 2025 19:39
@Zandor300
Zandor300 merged commit 373e974 into masterDec 3, 2025
10 checks passed
@Zandor300
Zandor300 deleted the copilot/add-m5-ipad-models branch December 3, 2025 19:57
@metal-presidentmetal-president mentioned this pull request Jan 19, 2026
Sign up for freeto 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.

Add M5 iPad models

3 participants

@Zandor300