Is it possible to do this (with a menu, a shortcut, or a modifier key + mouse)?
For example, you can use the mouse to test simple touch gestures in the simulator, like left mouse acts as single finger, and shift / option allow for different two finger gestures.
I have been unable to find any documentation one way or the other about whether this is possible, despite this developer.apple.com page where the simple, easy-to-understand API changes for supporting Apple Pencil hardware are documented.
Do I need a physical iPad Pro + Pencil hardware to test my Pencil support?
(My app is not a drawing app, just an app where touch input should work with large touch targets and Pencil should allow finer distinctions.)
No. The Pencil cannot act as a full functioning/full featured mouse.
Yes. When using an Apple Pencil, your iPad uses palm-rejection to sense - and ignore - your hand when resting on the screen. Pencil strokes are still recognised as you would expect. Handwriting recognition, however, remains an App-specific function.
You can use Apple Pencil to quickly take a picture of the iPad screen, then mark it up to share with others or use in documents. To capture the screen, swipe up with Apple Pencil from either corner at the bottom of your iPad. To mark up the screenshot, draw with Apple Pencil.
Simulating Different iOS Devices Open the iOS simulator, if it's not already open. From the Hardware menu, select Device, and then select the type of device you want to simulate. The simulator window will change to match the dimensions of the device you selected.
The Simulator does not currently support simulating Apple Pencil input. We are aware people would like to do this.
iOS 14
#if targetEnvironment(simulator)
canvasView.drawingPolicy = .anyInput
#else
canvasView.drawingPolicy = .pencilOnly
#endif
Also in the Settings app there is a global setting called "Only Draw with Apple Pencil". This can be read from UIPencilInteraction.prefersPencilOnlyDrawing
in PencilKit.
iOS 13 (only)
#if targetEnvironment(simulator)
canvasView.allowsFingerDrawing = true
#else
canvasView.allowsFingerDrawing = false
#endif
Courtesy of https://stackoverflow.com/a/62567169/2667933
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With