Force-quit and re-open Compass app The first thing you might want to do when your iPhone’s compass fails is to force

Enable Compass Calibration Another reason the compass on your iPhone could not function properly is compass calibration

Update iOS to the latest version If your iPhone’s software is outdated, it may result in compass issues.

Check for interference The compass on your iPhone depends on magnetic sensor

Turn off/on Location Service Sometimes, all you need to fix your iPhone compass not working is to turn off

Disable True North The iPhone has a feature called True North that helps you find your way around

Shake or back tap your iPhone Back pressing or shaking your iPhone is a tip you might want to try