Our advice is always to keep magnets away from any electrical or electronic device as a general rule as you never know what is inside each and every device. Magnetics has historically been linked to damaging storage devices based on magnetic storage which can include a credit card strip, a hard drive, a floppy disc etc…  However, most phones and tablets use non-magnetic storage today so this is no longer the issue it once was. Newer devices do contain critical components that can be sensitive to magnetism.  It is likely that you would need to expose it to the field of a very strong magnet but none the less there is a risk of damage.