Here's a little thing I made that solves an extrem...
# share-your-work
i
Here's a little thing I made that solves an extremely specific problem. At Ink & Switch, one of the things we're researching is a new kind of "dynamic notebook" — something sort of like a pad of paper, but programmable. As part of this research we build a lot of little prototype apps. We use the web platform for prototyping because the iteration time is really fast. We run these prototypes on iPad, because the form factor (tablet + stylus) is very close to what we have in mind for our dynamic notebook. But a limitation of the Safari browser on iPad is that you can't receive simultaneous input from the Apple Pencil and your fingers. To work around this limitation, we built a little native iPad app in Swift. It loads a URL of your choosing (ie: the live-reloading dev server running your prototype de jour), then captures all incoming touch and pencil events on the native side and forwards them to the JS context. Just like that, your JS code gets full-fidelity (ie: 240 Hz) simultaneous input from fingers and the pen. And, if you want to hack in additional features that aren't available via the browser — like haptic feedback — you can easily whip that up on the Swift side. I've just packaged-up this Xcode project and some example JS code and put them up on Github: Wrapper. The code is covered by the Unlicense (public domain) so that you can scavenge this thing for parts without worry about credit or whatever. Just make shit! So, if you have a Mac, an iPad, and an Apple Pencil… and you want to do some experiments with rich gestural interfaces… and you want to write those experiments in JS… and you're in a hurry… then this project might be useful for you :)
t
Lovely! Hoping this becomes part of the platform someday 🤞