You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Carthage support would be great, but Carthage only supports dynamic frameworks at the moment, whereas this project's relatively complex build system puts out a static library. CocoaPods wraps this static library in a framework, which is how we support Swift. So if we can do something like that as part of the build process, we'd be able to support Carthage.
We’ve begun to publish 3.1.0 prereleases with dynamic frameworks attached. However, there are a couple issues blocking Carthage adoption:
Carthage insists on a vX.Y.Z tag format, whereas the Mapbox iOS SDK’s tags are formatted ios-vX.Y.Z (with -pre.P appended for prereleases), in order to support independent versioning of the iOS, OS X, and Android SDKs and the Node module. Although we stopped using the vX.Y.Z format to tag the cross-platform mbgl code in this repository months ago, it doesn’t seem right to move iOS releases to that format when non-iOS releases share this repository.
Carthage looks for release attachments whose names contain “.framework”. It’s also unclear to me whether the existing package structure, which puts the dynamic framework in a dynamic/ folder, is compatible with Carthage.
It’s also unclear to me whether the existing package structure, which puts the dynamic framework in a dynamic/ folder, is compatible with Carthage.
According to Carthage/Carthage#1056 (comment), the existing structure should be fine. We just need to publish a redundant copy of the “-dynamic.zip” package with “.framework” in the name.
Apparently Carthage considers any tag that doesn’t strictly conform to semver to meet the requirements specified in the Cartfile: Carthage/Carthage#469. Hopefully we’d get lucky because Android and Node releases have no “.framework” assets.
Carthage fundamentally isn’t compatible with monorepos like this one. We could maintain a separate repository for iOS SDK releases along the lines of #1623 (comment), but then why not split the iOS and macOS SDKs’ Objective-C codebase into a separate repo from the core mbgl project, as we originally did in mapbox-gl-cocoa?
Drag Mapbox.framework (located in Carthage/Build/Mac) into Linked Frameworks and Libraries.
Add this path to the Input Files section of the Run Script build phase that runs carthage copy-frameworks:
$(SRCROOT)/Carthage/Build/Mac/Mapbox.framework
Note that Carthage doesn’t currently support prereleases, even when you use the == operator. The binary project specification includes prereleases in anticipation of Carthage/Carthage#1553.
Edit: Renamed the binary project specification from “carthage.json” to “Mapbox-macOS-SDK.json”.
Activity
[-]Added support for Carthage[/-][+]Add support for Carthage[/+]1ec5 commentedon May 22, 2015
Carthage support would be great, but Carthage only supports dynamic frameworks at the moment, whereas this project's relatively complex build system puts out a static library. CocoaPods wraps this static library in a framework, which is how we support Swift. So if we can do something like that as part of the build process, we'd be able to support Carthage.
incanus commentedon May 22, 2015
Dynamic framework is tracked in #828.
alec-c4 commentedon May 25, 2015
carthage support would be great!
petaren commentedon Nov 11, 2015
+1 on carthage support
erichoracek commentedon Dec 2, 2015
For anyone interested in a temporary way to include Mapbox via Carthage until #828 is resolved, I've created a mirror using the Rome CocoaPods plugin at https://github.com/erichoracek/Mapbox.
1ec5 commentedon Jan 30, 2016
We’ve begun to publish 3.1.0 prereleases with dynamic frameworks attached. However, there are a couple issues blocking Carthage adoption:
1ec5 commentedon Jan 30, 2016
According to Carthage/Carthage#1056 (comment), the existing structure should be fine. We just need to publish a redundant copy of the “-dynamic.zip” package with “.framework” in the name.
1ec5 commentedon Jan 30, 2016
Apparently Carthage considers any tag that doesn’t strictly conform to semver to meet the requirements specified in the Cartfile: Carthage/Carthage#469. Hopefully we’d get lucky because Android and Node releases have no “.framework” assets.
friedbunny commentedon Feb 1, 2016
IIRC, Carthage downloaded the Android release when I tried it a few days back (and Android was the most recent).
maciekish commentedon Mar 4, 2016
+1
4 remaining items
1ec5 commentedon Jul 15, 2016
Carthage/Carthage#722 would give us another way forward for this issue.
cansurmeli commentedon Nov 14, 2016
+1 Carthage
1ec5 commentedon Nov 16, 2016
Carthage fundamentally isn’t compatible with monorepos like this one. We could maintain a separate repository for iOS SDK releases along the lines of #1623 (comment), but then why not split the iOS and macOS SDKs’ Objective-C codebase into a separate repo from the core mbgl project, as we originally did in mapbox-gl-cocoa?
erichoracek commentedon Feb 15, 2017
The most recent version of Carthage (0.19) has added support for binary downloads, e.g.:
See the JSON file spec here.
Is this something that could work for MBGL rather than a separate repo with releases?
friedbunny commentedon Feb 15, 2017
Thanks for the heads-up, @erichoracek — we've added tentative support for Carthage. 🏛
I’ll leave this issue open for now so we can track how well this initial Carthage support works, and also as a reminder to add official documentation.
How to use the Mapbox iOS SDK with Carthage
If you’re new to Carthage, follow these setup instructions.
There is also a
-symbolsfeed available.Drag Mapbox.framework (located in
Carthage/Build/iOS) into Linked Frameworks and Libraries.Add this to your Carthage copy-frameworks build phase:
Caveats
==operator. Support is a work-in-progress in Add support for pre-release and build metadata, as per SemVer specs Carthage/Carthage#1553. (Nonetheless, pre-releases are optimistically included in our feeds.)mdiep commentedon Feb 16, 2017
Please be sure to open a Carthage issue if you have any feedback about this feature!
I'm excited to see people adopting this feature. 🤘
friedbunny commentedon Feb 16, 2017
@mdiep, on behalf of all monorepoists out there, thank you. 😉
1ec5 commentedon Feb 21, 2017
The Mapbox macOS SDK supports Carthage through a setup workflow similar to the one in #1623 (comment). Here are the general instructions for a macOS project, and here are the steps for the macOS SDK specifically:
Carthage/Build/Mac) into Linked Frameworks and Libraries.carthage copy-frameworks:Note that Carthage doesn’t currently support prereleases, even when you use the
==operator. The binary project specification includes prereleases in anticipation of Carthage/Carthage#1553.Edit: Renamed the binary project specification from “carthage.json” to “Mapbox-macOS-SDK.json”.
friedbunny commentedon Mar 1, 2017
iOS instructions are live at: https://www.mapbox.com/ios-sdk/
friedbunny commentedon Mar 3, 2017
Fixed in #8257.