If I hold a strong neodymium magnet near my iPhone while the compass app is running, there is no effect whatsoever on the compass bearing. It doesn't matter where I hold the magnet in relation to the phone, nor which way the magnet itself is oriented. It also doesn't matter if I hold the magnet near the phone before I start the compass app (I thought perhaps that the compass app might take an initial bearing and then use the phone's gyroscopes to calculate offsets from this). How is this possible? Clarification: the compass on the phone is working perfectly as a compass i.e. it indicates magnetic north correctly. So the compass is somehow indicating earth's magnetic field while not being susceptible to nearby strong magnet.