Please make sure the actualization in background mode is activated:
Choose “Settings” on your iPhone/iPad -> “General“ -> ”Privacy” –> “Location services”: “Share my location”.
In addition, the compass calibration positioning service must be active in the system services: "Settings" ⇒ "Privacy" ⇒ "Location Services" ⇒ the app must have "On Use" selected.
The magnetic closure of a flipcase for the iPhone can also cause compass problems. Especially with an iPhone X (if the magnet is placed on the long side) this problem is to be noted, because the compass calibration always runs automatically in the background. If the iPhone X is removed from the case, the compass is automatically calibrated.