-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -713,6 +713,56 @@ class DeviceKitTests: XCTestCase { | |||
| } | ||||
| } | ||||
|
|
||||
| func testApplePencilSupport() { | ||||
| // Test iPad (10th gen) - Supports Apple Pencil (1st gen) and Apple Pencil (USB-C) | ||||
| XCTAssertTrue(Device.iPad10.applePencilSupport.contains(.firstGeneration)) | ||||
| XCTAssertTrue(Device.iPad10.applePencilSupport.contains(.firstGenerationUsbC)) | ||||
| XCTAssertFalse(Device.iPad10.applePencilSupport.contains(.secondGeneration)) | ||||
| XCTAssertFalse(Device.iPad10.applePencilSupport.contains(.pro)) | ||||
|
|
||||
| // Test iPad (A16) - Supports Apple Pencil (1st gen) and Apple Pencil (USB-C) | ||||
| XCTAssertTrue(Device.iPadA16.applePencilSupport.contains(.firstGeneration)) | ||||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| // Test iPad Air 11" (M2) - Supports Apple Pencil Pro and Apple Pencil (USB-C) | ||||
| XCTAssertFalse(Device.iPadAir11M2.applePencilSupport.contains(.firstGeneration)) | ||||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| // Test iPad Air 13" (M2) - Supports Apple Pencil Pro and Apple Pencil (USB-C) | ||||
| XCTAssertFalse(Device.iPadAir13M2.applePencilSupport.contains(.firstGeneration)) | ||||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| // Test iPad Air 11" (M3) - Supports Apple Pencil Pro and Apple Pencil (USB-C) | ||||
| XCTAssertFalse(Device.iPadAir11M3.applePencilSupport.contains(.firstGeneration)) | ||||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| // Test iPad Air 13" (M3) - Supports Apple Pencil Pro and Apple Pencil (USB-C) | ||||
| XCTAssertFalse(Device.iPadAir13M3.applePencilSupport.contains(.firstGeneration)) | ||||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| // Test iPad Pro 11" (M4) - Supports Apple Pencil Pro and Apple Pencil (USB-C) | ||||
| XCTAssertFalse(Device.iPadPro11M4.applePencilSupport.contains(.firstGeneration)) | ||||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| // Test iPad Pro 13" (M4) - Supports Apple Pencil Pro and Apple Pencil (USB-C) | ||||
| XCTAssertFalse(Device.iPadPro13M4.applePencilSupport.contains(.firstGeneration)) | ||||
| XCTAssertTrue(Device.iPadPro13M4.applePencilSupport.contains(.firstGenerationUsbC)) | ||||
| XCTAssertFalse(Device.iPadPro13M4.applePencilSupport.contains(.secondGeneration)) | ||||
| XCTAssertTrue(Device.iPadPro13M4.applePencilSupport.contains(.pro)) | ||||
| } | ||||
|
|
||||
| #endif | ||||
|
|
||||
| // MARK: - tvOS | ||||
|
|
||||
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.
trailing_whitespaceTests.swift:722