Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Swift Package Manager #15241

Open
dmertsalov opened this issue Jul 29, 2019 · 11 comments
Open

Swift Package Manager #15241

dmertsalov opened this issue Jul 29, 2019 · 11 comments
Labels
build feature iOS Mapbox Maps SDK for iOS

Comments

@dmertsalov
Copy link

Hello!

Can you add support for Swift Package Manager?
It is quite popular and promoted by Apple dependency manager and would be great if you add it.

Thanks!

@julianrex julianrex added feature iOS Mapbox Maps SDK for iOS build labels Jul 29, 2019
@julianrex
Copy link
Contributor

Hi @dmertsalov - thanks for the feature request! This is something that we're investigating, but we don't have an ETA for this currently.

/cc @frederoni

@1ec5
Copy link
Contributor

1ec5 commented Jul 29, 2019

We have begun to support SPM in some of our Swift libraries: mapbox/MapboxStatic.swift#96 mapbox/mapbox-directions-swift#234 mapbox/MapboxGeocoder.swift#132 mapbox/mapbox-speech-swift#25 mapbox/turf-swift#30.

However, I don’t see a straightforward way for the map and navigation SDKs to be distributed via SPM at the moment. SPM doesn’t yet support binary dependencies. Until it does, the map SDK and its dependencies (MapboxAccounts and MapboxMobileEvents) would have to be built from source, but SPM also doesn’t allow resources to be included in targets. Perhaps there are workarounds for either issue though.

@bleege
Copy link
Contributor

bleege commented Sep 24, 2019

👋 @1ec5 Just wondering if there's been any movement on this topic since July? Now that Xcode 11 has native support for Swift Package Manager it's the de facto "Apple approved way" to include 3rd party libraries like Mapbox. It looks like dependencies are now supported (according to Apple's docs -- see link below). I'm admittedly out of date as the current state of the Mapbox iOS ecosystem so I don't know if this is possible at this time, but based on where Apple is going it seems like something that Mapbox should support sooner rather than later. Thoughts?

https://developer.apple.com/documentation/swift_packages/creating_a_swift_package_with_xcode

@david-var
Copy link

@1ec5 any updates here since July?

@1ec5
Copy link
Contributor

1ec5 commented Jan 30, 2020

SPM doesn’t yet support binary dependencies. Until it does, the map SDK and its dependencies (MapboxAccounts and MapboxMobileEvents) would have to be built from source

As of mapbox/mapbox-gl-native-ios#60, the map SDK's MapboxMobileEvents dependency is built from source. However, as a closed-source library, MapboxAccounts needs to continue to be pulled in as a binary, whether we statically or dynamically link it into the map SDK.

@julianrex, are the steps to building the map SDK from source similar with SPM as with Carthage (mapbox/mapbox-gl-native-ios#133)? For MapboxAccounts, @alfwatt @frederoni have mused about a Run Script build phase that would take the place of any dependency manager’s transitive dependency functionality.

@timotheeduran
Copy link

@1ec5 Hi! Any updates since Binary Dependencies are now officially supported by SPM in Swift 5.3 and Xcode 12? Thank you so much!

@Wouter125
Copy link

Is there any update incoming? Or is this issue gone cold? Because I'm holding of the Carthage integration for now.

@Neilfau
Copy link

Neilfau commented Aug 18, 2020

Any updates about this? Should now be possible with swift-tools-version:5.3 and Xcode 12.

@arthurschiller
Copy link

Any news? We would love to fully migrate from CocoaPods soon and Mapbox is one of the last libraries with missing support.

@knov
Copy link

knov commented Sep 14, 2020

Thank you for your continued patience. We are tracking on addition of netrc support with SPM and working on our timeline for adding support.

@david-var
Copy link

david-var commented Sep 14, 2020

Any news? We would love to fully migrate from CocoaPods soon and Mapbox is one of the last libraries with missing support.

Same in our case, the only library that did not support SPM yet. We fully switched to SPM now, except Mapbox as it works with Carthage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

10 participants