pointfreeco / composable-core-location

A library that bridges the Composable Architecture and Core Location.
MIT License
107 stars 56 forks source link

Adds missing live implementation of monitoringSignificantLocationChanges #5

Closed myurieff closed 3 years ago

mbrandonw commented 3 years ago

Hey @myurieff, thanks for the PR!

It looks like we've already got support for startMonitoringSignificantLocationChanges and stopMonitoringSignificantLocationChanges but it just isn't exposed to macOS:

https://github.com/pointfreeco/composable-core-location/blob/ed26538db41294e56a76ddd869c8143d3a3f3bab/Sources/ComposableCoreLocation/Live.swift#L130-L134 https://github.com/pointfreeco/composable-core-location/blob/ed26538db41294e56a76ddd869c8143d3a3f3bab/Sources/ComposableCoreLocation/Live.swift#L158-L162

Is the main purpose of your change to expose it to macOS? If so I think you could update this PR to just add a || os(macOS) to the lines above and it should be work.

myurieff commented 3 years ago

Hm, I was using the live client on iOS and it crashed when invoking startMonitoringSignificant... with the unimplemented message 🤔 Perhaps there's something else to it.