Created
April 17, 2025 08:53
-
-
Save jacobsapps/daac50122445e0d3584fa5254009ab55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class LocationManager: CLLocationManager, CLLocationManagerDelegate { | |
private var rotationCallback: ((Double) -> Void)? | |
var rotationAngleStream: AsyncStream<Double> { | |
AsyncStream(bufferingPolicy: .bufferingNewest(1)) { continuation in | |
rotationCallback = { | |
continuation.yield($0) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment