Hmmm good question i know if you swipe a big magnet over a computer it will whip the hard drive memory. So maybe it will have the same affect as long as it was at a good distance.
It may or may not permanently damage it, but it is not worth trying. A magnet can ruin almost any electronic device, the iphone included so most likely yes, but to what degree I hope remains unknown