What you said
You were naive but you have learnt from this experience, so don't worry. They will not sack you - at worst it will be written on your records, but I doubt even that. Put it down to experience.
You are being way too hard on yourself: what you describe could have happened to anyone - and besides, you have learnt a valuable lesson that you would not pick up out of a teaching textbook. You have discovered what pupils are capable of doing with iPads and will now be in a position to take steps to prevent it as far as possible in future lessons.
The expert view
You have no need to feel dumb; you are not defeated; you are certainly not alone. You have simply made a small error. No one was hurt and nothing was damaged beyond repair. You are being far too hard on yourself.
Ironically, I find it is the people with the highest standards who often do this, because they expect so much of themselves and then feel the contrast more keenly when they cannot always match those expectations.
In your career, you will make many mistakes. How will you deal with them? This is as much a test of your ability as anything else. When you trip, stand up again and be more careful in future.
Unfortunately, in all walks of life, there will be people who take delight in torturing others over their mistakes. I suspect it makes them feel better about themselves. Or you may have taken their criticism too much to heart? In any case, making mistakes is part of getting better, as is being told when you have erred.
Forget about it. If you can balance your high expectations with perspective, I expect you will make a great teacher.
Tom Bennett's latest book, Teacher, is out now, published by Continuum.