I have an iPhone 3GS. I’m not sure why but the compass stopped working. (Maybe because the phone is a couple of years old, has some cracks in the case, and has seen heavy use.) When I’d start the compass (or any app that used the compass) I’d get a message about interference and an instruction to swirl the phone around in a figure 8.
I tried the using the compass away from all electronics or other metal objects that might cause interference and swirled it around in a figure 8 until my arm was about to fall off. Nothing got it working. Finally after some Google-assisted research someone suggested moving a magnet near the phone.
I had trepidations about putting a magnet near a sensitive electronic device (magnets can erase hard drives), but I figured what the heck, let’s try it.
I grabbed a flat refrigerator magnet, fired up the compass app, slowly moved the magnet close to the right side of the case, and when it got about 1/8″ from the side of the case, BINGO—the interference message disappeared and the compass was working again! No problems with the phone that I can tell, and the compass is pointing in the right direction.
Now I can finally try that SkyView app I bought the other day.