-
Notifications
You must be signed in to change notification settings - Fork 457
Fix Apple Pencil compatibility for M4 iPad Pro and M2/M3 iPad Air models #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>
Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>
SwiftLint found issuesWarnings
Generated by 🚫 Danger |
|
@copilot remove sourceLocation lines from generated Swift file. |
Co-authored-by: Zandor300 <6069593+Zandor300@users.noreply.github.com>
| XCTAssertTrue(Device.iPad10.applePencilSupport.contains(.firstGenerationUsbC)) | ||
| XCTAssertFalse(Device.iPad10.applePencilSupport.contains(.secondGeneration)) | ||
| XCTAssertFalse(Device.iPad10.applePencilSupport.contains(.pro)) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing whitespace.trailing_whitespace Tests.swift:722 |
| XCTAssertTrue(Device.iPadA16.applePencilSupport.contains(.firstGenerationUsbC)) | ||
| XCTAssertFalse(Device.iPadA16.applePencilSupport.contains(.secondGeneration)) | ||
| XCTAssertFalse(Device.iPadA16.applePencilSupport.contains(.pro)) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing whitespace.trailing_whitespace Tests.swift:728 |
| XCTAssertTrue(Device.iPadAir11M2.applePencilSupport.contains(.firstGenerationUsbC)) | ||
| XCTAssertFalse(Device.iPadAir11M2.applePencilSupport.contains(.secondGeneration)) | ||
| XCTAssertTrue(Device.iPadAir11M2.applePencilSupport.contains(.pro)) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing whitespace.trailing_whitespace Tests.swift:734 |
| XCTAssertTrue(Device.iPadAir13M2.applePencilSupport.contains(.firstGenerationUsbC)) | ||
| XCTAssertFalse(Device.iPadAir13M2.applePencilSupport.contains(.secondGeneration)) | ||
| XCTAssertTrue(Device.iPadAir13M2.applePencilSupport.contains(.pro)) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing whitespace.trailing_whitespace Tests.swift:740 |
| XCTAssertTrue(Device.iPadAir11M3.applePencilSupport.contains(.firstGenerationUsbC)) | ||
| XCTAssertFalse(Device.iPadAir11M3.applePencilSupport.contains(.secondGeneration)) | ||
| XCTAssertTrue(Device.iPadAir11M3.applePencilSupport.contains(.pro)) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing whitespace.trailing_whitespace Tests.swift:746 |
| XCTAssertTrue(Device.iPadAir13M3.applePencilSupport.contains(.firstGenerationUsbC)) | ||
| XCTAssertFalse(Device.iPadAir13M3.applePencilSupport.contains(.secondGeneration)) | ||
| XCTAssertTrue(Device.iPadAir13M3.applePencilSupport.contains(.pro)) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing whitespace.trailing_whitespace Tests.swift:752 |
| XCTAssertTrue(Device.iPadPro11M4.applePencilSupport.contains(.firstGenerationUsbC)) | ||
| XCTAssertFalse(Device.iPadPro11M4.applePencilSupport.contains(.secondGeneration)) | ||
| XCTAssertTrue(Device.iPadPro11M4.applePencilSupport.contains(.pro)) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing whitespace.trailing_whitespace Tests.swift:758 |
Fix incorrect Apple Pencil compatibility for recent iPad models
Based on Apple's official documentation at https://support.apple.com/en-au/HT211029:
Changes Summary:
✅ iPad (10th gen) & iPad (A16)
✅ iPad Air 11" & 13" (M2)
✅ iPad Air 11" & 13" (M3)
✅ iPad Pro 11" & 13" (M4)
Technical Changes:
Files Changed:
Source/Device.swift.gyb- Updated device definitions and added template case for value 13Source/Device.generated.swift- Regenerated from template without sourceLocation lines (1235 debug lines removed)Tests/Tests.swift- Added 50 lines of tests validating all changesNote: This project requires macOS with Xcode to build and test. The CI pipeline will validate these changes on macOS.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.