Calibrating a smartphone compass should be OS-independent … move the smartphone through the air following an imagined “8” (or infinity loop) in different directions (or dimensions) until the respective App doesn’t complain anymore.
Checking OS-independently whether the compass is right is harder … Sun? Stars? Known orientation of nearby streets or railways?