When the compass will not behave
Almost every problem with a phone qibla compass is one of five things. They are in rough order of how often they turn out to be the cause.
1. Nothing happens when you tap the button (iPhone)
Since iOS 13, Safari will not give a page any compass data until you ask for it from a tap — and it will only ask once per visit. If the permission prompt never appeared, or you dismissed it, reload the page and tap again.
If the prompt still does not appear, check Settings → Safari → Motion & Orientation Access is switched on. It is off by default on some configurations, and while it is off no website on any browser on the phone can read the compass. Private browsing windows also refuse it in some iOS versions.
2. The needle drifts or will not settle
The magnetometer needs calibrating, which on both platforms means moving the phone through all three axes: hold it out and trace a figure of eight in the air a few times, rotating your wrist as you go. It looks silly and it takes about five seconds.
If it settles and then wanders again a minute later, something nearby is the cause rather than the sensor. Walk a few metres away from desks, radiators, laptops, speakers, kitchen appliances and cars, and try again.
3. It points roughly the opposite way
Look at your phone case. MagSafe cases, magnetic car mounts, magnetic wallet attachments and folio covers with a magnetic clasp all sit millimetres from the magnetometer, and a magnet that close does not disturb the reading so much as replace it. Take the case off and check whether the answer changes.
A reading that is out by roughly 180° almost always has a physical cause of this kind, not a software one.
4. It disagrees with another qibla app by a degree or two
That is the expected difference between a tool that corrects for magnetic declination and one that does not. Across Britain the gap runs from about one degree east of true north in the south-east of England to about one degree west in Northern Ireland.
A degree or two is also nowhere near enough to affect a prayer — the margin the jurists allow is very much wider than that.
5. The phone has no compass at all
Many tablets and some budget handsets ship without a magnetometer, and no website or app can conjure one. The bearing in degrees is still exact, and it can be used with the sun, a map or a landmark instead.
Still wrong?
Compare degrees rather than arrows, and check the figure against the city table on the front page. If your reading is more than about five degrees from the one listed for your city, the compass is being disturbed by something — the number itself is not in doubt.