My app works with Apple Pencil so i added this line in my Main ViewController and it works right:
func setupApplePencil() { let pencilInteraction = pencil