Apple came up with to attach the stylus to the tablet with magnets
In the database the US patent office appeared patent application No. 20160284497 filed by Apple in March of last year. It describes the «dynamically stable magnetic array». The array includes permanent magnets and electromagnets. In fact, it is a mount in which the permanent magnets keep the components together, and magnets are included for alignment and to keep the connection under certain conditions.
The intent of the inventors, magnets, for example, can be attached to the tablet pen.
Or to connect two tablet.
Recall that Apple already owns the patent for the connection of two electronic devices magnetic mount. In particular, it describes the connection of the two tablets in which one of them plays the role of a touch keyboard.