Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor WMFLocationManager to Swift #3

Open
wants to merge 19 commits into
base: develop
from
Open
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Don't propagate location errors when in the simulator

  • Loading branch information
jantimar authored and VojtaStavik committed Feb 28, 2020
commit a27f007b3777bc785c8936f5d7909729e57a835e
@@ -174,6 +174,13 @@ extension LocationManager: CLLocationManagerDelegate {
public func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
guard isUpdating else { return }

#if targetEnvironment(simulator)
let nsError = error as NSError
guard !(nsError.domain == kCLErrorDomain && nsError.code == CLError.locationUnknown.rawValue) else {
return
}
#endif

delegate?.locationManager(self, didReceive: error)
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.