Created
June 12, 2024 19:30
-
-
Save ngengesenior/3d12be7768f85506af5ec5affb36301e 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
override fun locationManager(manager: CLLocationManager, didFailWithError: NSError) { | |
locationPermissionStatusCancellableContinuation?.let { | |
if (it.isActive) { | |
it.resume(LocationPermissionStatus.RESTRICTED_OR_DENIED) | |
locationPermissionStatusCancellableContinuation = null | |
} | |
} | |
locationResultContinuation?.let { | |
if (it.isActive) { | |
it.resumeWithException(Exception("Failed to get location,description:${didFailWithError.localizedDescription},code:${didFailWithError.code}")) | |
locationResultContinuation = null | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment