mapbox-directions-swift: Error `'MapboxDirections/MapboxDirections.h' file not found` after installing MapboxNavigation
Hi there,
I’ve installed MapboxNavigation iOS via CocoaPods without experiencing any issues. But after compiling the project in Xcode I got two errors produced by the library. One error is 'MapboxDirections/MapboxDirections.h' file not found:
I tried to just comment out the line of code that produced the error and the whole project indeed compiled successfully. As I can evaluate the import that produces the error isn’t needed in the file at all. Is this true?
After doing this hacky bugfix, I started writing some lines of Mapbox code and got another error:
The code:
import Foundation
import UIKit
import MapboxCoreNavigation
import MapboxNavigation
import MapboxDirections
...
let navigationService = MapboxNavigationService(route: route, simulating: .always)
let navigationController = NavigationViewController(for: route, navigationService: navigationService)
viewController.addChildViewController(navigationController);
viewController.addSubview(navigationController.view);
The resulting error:
Command failed due to signal: Abort trap: 6
I’ve no clue what this error means and think that it may have something to do with my hacky bugfix. Is this possible?
Mapbox Navigation SDK version: 0.22.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 27 (12 by maintainers)
It’s not a long-term solution but I was able to work around this issue by renaming
MapboxDirections.swifttoMapboxDirectionsand using the following Podfile:Podfile
along with renaming
MapboxDirections.swift.podspectoMapboxDirections.podspecand editMapboxCoreNavigation.podspecto depend onMapboxDirectionsinstead ofMapboxDirections.swift.I know there was an issue with
.in framework names in Xcode 6/7, but the bug seems to have re-surfaced, at least with static frameworks.Add
use_frameworks!belowplatform :ios, '9.0'and it should work.Feel free to re-open if the issue persists.