SPM CoreLocation for Linux

Hi there,

I'm currently trying to port a current xcode project (iOS based) to a swift project that will be both compiled on linux (it will eventually end up on an AWS Lambda) and imported into a different xcode project.

In the Xcode project, I'm currently using CLLocation. In the xcode project, it will be finding the location using CLLocationManager, though obviously on a lambda it couldn't do that. However, I still want to be able to process CLLocations.

Is there a way to import CLLocation to be built on Linux? I suppose a work-around would be to just send the lat/long as a tuple, but I'd like to avoid refactoring all that code if I can.

Thanks!

CoreLocation is an Apple framework, it is not open source. If you need a common type between platforms you'll need to define it yourself, or use a dependency that does so.

Okay, that makes sense.
I'm assuming the same with MapKit?

Yes. It's generally true of all Apple frameworks except Foundation (and parts of CoreFoundation).

Terms of Service

Privacy Policy

Cookie Policy