Initializes an input to use a specified device.
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+Beta
The device from which to capture input.
If an error occurs during initialization, upon return contains an
NSErrorobject describing the problem.
An input initialized to use
In Swift, this API is imported as an initializer and is marked with the
throws keyword to indicate that it throws an error in cases of failure.
You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in The Swift Programming Language (Swift 4.1) and About Imported Cocoa Error Parameters.