headless_compass 0.1.0
headless_compass: ^0.1.0 copied to clipboard
Headless iOS compass: a typed stream of magnetic and true heading with accuracy. No widgets, no exceptions, no location permission until you ask for it.
0.1.0 #
First release.
isAvailable()— runtime check viaCLLocationManager.headingAvailable(), never inferred from the device model.watch()— stream ofHeadingSamplecarrying degrees, accuracy and source (magnetic or true north).requestTrueNorth()— asks for location permission only when called. Denial keeps the stream running on magnetic heading.- Never throws. A missing plugin, a simulator, or a device without a
magnetometer all surface as
isAvailable() == false. HeadingSample.isUsableisfalsewheneverheadingAccuracyis negative — that is Apple's way of saying the reading cannot be trusted.- iOS only.