Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation crashing on load #2141

Closed
arthurchadRG opened this issue May 30, 2019 · 4 comments
Closed

Navigation crashing on load #2141

arthurchadRG opened this issue May 30, 2019 · 4 comments

Comments

@arthurchadRG
Copy link

Currently using version 0.33.0 of the navigation lib. When the navigation view controller is presented it crashes with the following error:

image

I'm not sure if it's related to the way I had to import the library in my podfile:

 pod 'MapboxNavigation', :path => '../mapbox-navigation-ios'
 pod 'MapboxMobileEvents', :modular_headers => true
 pod 'MapboxDirections', :path => '../MapboxDirections.swift', :modular_headers => true

I had to import the library this way since I'm still using GooglePlaces library in my code base.

The core mapping functionality seems to work, but every time I try to present the navigation view controller I get the error above.

Here's the code that presents the view controller:

let origin = Waypoint(coordinate: currentLocation.coordinate, name: "Start Location")
           let destination = Waypoint(coordinate: viewModel.trip.tripDetails.startingLocation.cordinates(), name: "End Location")
           
           let options = NavigationRouteOptions(waypoints: [origin, destination])
           
           
           
           Directions.shared.calculate(options) { (waypoints, routes, error) in
               guard let route = routes?.first else { return }
               
               let viewController = NavigationViewController(for: route)
               self.present(viewController, animated: true, completion: nil)
           }
@frederoni
Copy link
Contributor

I think this is a duplicate of #1017
Looks like the Nav SDK cannot find the reroute-sound file when being linked statically.
Can you try adding use_frameworks! in your Podfile or does any library prevent you from doing that?

@arthurchadRG
Copy link
Author

Hi @frederoni,

The google libraries prevent me from doing that unfortunately. Maybe I need to point to the sound file in a different way?

@arthurchadRG
Copy link
Author

Update: I solved my particular issue by removing the google places pod and just hitting their API directly. I'm then able to use use_frameworks! which fixes the reroute-sound issue,

@frederoni
Copy link
Contributor

The remaining issues to support integrating the Navigation SDK statically with CocoaPods is being tracked #1017 and mapbox/mapbox-directions-swift#318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants