[PLACEHOLDER] Apple Pencil input validation on iPad hardware #120

Open
opened 2025-12-17 04:11:18 +00:00 by siennathesane · 0 comments
siennathesane commented 2025-12-17 04:11:18 +00:00 (Migrated from github.com)

Description

In order to validate Apple Pencil input on iPad hardware for v1,
as a Marathon developer,
I need to implement Apple Pencil event registration in the iOS platform layer and differentiate pencil input from touch input with full pressure and tilt data.

This was originally scoped for v0 but moved to v1 due to Apple Developer Program fees and provisioning requirements for testing on hardware iPad.

Acceptance Criteria

Scenario: Apple Pencil events are captured
  Given an iPad with Apple Pencil
  When the user draws with the pencil
  Then pencil input events are registered

Scenario: Touch vs pencil differentiation works
  Given an iPad with Apple Pencil
  When the user touches with finger and draws with pencil
  Then the system correctly identifies each input type

Scenario: Pressure data is available
  Given an iPad with Apple Pencil
  When the user varies pencil pressure
  Then pressure values are captured accurately

Scenario: Tilt data is available
  Given an iPad with Apple Pencil
  When the user tilts the pencil
  Then tilt angle and azimuth are captured accurately

Scenario: Events are logged for validation
  Given Apple Pencil input is working
  When input events occur
  Then events are logged with type, position, pressure, and tilt data

Technical Notes

  • Dependencies:
    • Apple Developer Program membership ($99/year) for device provisioning
    • iOS platform layer implementation
  • Approach:
    • Register UITouch events in iOS platform layer
    • Use UITouch.type to differentiate pencil (.pencil) from finger (.direct)
    • Capture UITouch.force for pressure data
    • Capture UITouch.azimuthAngle and azimuthUnitVector for tilt
    • Log all events for validation (no drawing UI needed for v1)
  • Files affected:
    • crates/libmarathon/src/platform/ios/input.rs
    • New: crates/libmarathon/src/platform/ios/pencil.rs

Additional Context

Part of v1 iPad hardware validation. No rendering or drawing UI required - just event logging to prove Apple Pencil input works correctly. Full drawing/painting features come in later milestones.

## Description In order to validate Apple Pencil input on iPad hardware for v1, as a Marathon developer, I need to implement Apple Pencil event registration in the iOS platform layer and differentiate pencil input from touch input with full pressure and tilt data. This was originally scoped for v0 but moved to v1 due to Apple Developer Program fees and provisioning requirements for testing on hardware iPad. ## Acceptance Criteria ```gherkin Scenario: Apple Pencil events are captured Given an iPad with Apple Pencil When the user draws with the pencil Then pencil input events are registered Scenario: Touch vs pencil differentiation works Given an iPad with Apple Pencil When the user touches with finger and draws with pencil Then the system correctly identifies each input type Scenario: Pressure data is available Given an iPad with Apple Pencil When the user varies pencil pressure Then pressure values are captured accurately Scenario: Tilt data is available Given an iPad with Apple Pencil When the user tilts the pencil Then tilt angle and azimuth are captured accurately Scenario: Events are logged for validation Given Apple Pencil input is working When input events occur Then events are logged with type, position, pressure, and tilt data ``` ## Technical Notes - Dependencies: - Apple Developer Program membership ($99/year) for device provisioning - iOS platform layer implementation - Approach: - Register UITouch events in iOS platform layer - Use UITouch.type to differentiate pencil (.pencil) from finger (.direct) - Capture UITouch.force for pressure data - Capture UITouch.azimuthAngle and azimuthUnitVector for tilt - Log all events for validation (no drawing UI needed for v1) - Files affected: - `crates/libmarathon/src/platform/ios/input.rs` - New: `crates/libmarathon/src/platform/ios/pencil.rs` ## Additional Context Part of v1 iPad hardware validation. No rendering or drawing UI required - just event logging to prove Apple Pencil input works correctly. Full drawing/painting features come in later milestones.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: studio/marathon#120