maplibre-navigation-ios icon indicating copy to clipboard operation
maplibre-navigation-ios copied to clipboard

Creating binaries from SDK for wrapping into XCFramework fails

Open mindthefish opened this issue 8 months ago • 8 comments

I am working on a fork of the SDK with some closed-source additions. I need the ability to deploy the SDK as a binary. So far I am using the pre-SPM version which I can compile using xcodebuild archive, xcodebuild -create-xcframework or Carthage. Since the switch to SPM, this option is no longer available, so I try to build the current version (main branch) via swift build or swift create-xc-framework. Unfortunately I encounter errors when building the dependencies.

Steps to Trigger Behavior

  1. checkout the main branch of this repo
  2. archive the targets specified in the Package.swift using xcodebuild or swift commands
  3. bundle the archives to a XCFramework

Expected Behavior

Build / archive command should complete without errors

Actual Behavior

I.e. swift build leads to error: ".../maplibre-navigation-ios/MapboxNavigationObjC/MLNMapView+MLNNavigationAdditions.h:1:9: fatal error: 'MapLibre/Mapbox.h' file not found #import <MapLibre/Mapbox.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated."

Version(s) affected

  • main branch at (commit https://github.com/maplibre/maplibre-navigation-ios/commit/eaee92b308df0ad15832767e4ac1d71df8116211), but I think this applies to all versions since change to SPM.

Has anyone ever tried to build maplibre-navigation-ios as a binary? I want to deploy it as XCFramework binary as part of a Swift package.

mindthefish avatar Jun 13 '24 15:06 mindthefish