Use a mouse on iOS with PointerKit

Great work by Louis D’hauwe:

PointerKit is a proof of concept framework to use a pointing device on iOS. This is done via a multipeer connection between a Mac and an iOS device. The pointer movement is captured by the Mac app, after which it’s send to the receiving iOS device (over Bluetooth or Wi-Fi).

Implementation is simple. After having added the PointerKit Framework, add these couple of lines to your project:

var manager: PointerManager!

override func viewDidAppear(_ animated: Bool) {
    manager = PointerManager(with: self, in: UIApplication.shared.keyWindow!)

However. PointerKit uses private APIs, so Apple will refuse your app upon submission :-/

Pointerkit →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.