flitsmeister / maplibre-navigation-ios

Repo is moved to https://github.com/maplibre/maplibre-navigation-ios
Other
6 stars 5 forks source link

Getting started doc not working #15

Closed odemolliens closed 1 year ago

odemolliens commented 2 years ago

It's really hard to understand how to set up the libary in a project: Multiple explanations for the same things, some commands are wrong or do not exist.

Samples don't work.

Navigation SDK version: latest

  1. Create new project
  2. Add cartfile
  3. Run carthage update --platform iOS as explained in doc

Error:

Building universal frameworks with common architectures is not possible. The device and simulator slices for "MapboxMobileEvents" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.

Fix:

  1. Run should be carthage update --platform iOS --use-xcframeworks
odemolliens commented 2 years ago

then another missing thing:

  1. add Swift package https://github.com/maplibre/maplibre-gl-native-distribution with version 5.12.2
odemolliens commented 2 years ago

Doc said:

Follow the rest of [Carthage’s iOS integration instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos). Your application target’s Embedded Frameworks should include MapboxNavigation.framework and MapboxCoreNavigation.framework.

Then we face that issue: Screenshot 2022-08-24 at 10 45 25

But in fact, you have to add more than that: Screenshot 2022-08-24 at 10 47 02

Documention should mention that all Mapbox SDK shoud be in the Embedded Frameworks too!

  1. then we should configure "Framework Search Paths" to $(PROJECT_DIR)/Carthage/Build/iOS
odemolliens commented 2 years ago

App crash at launch: *** Terminating app due to uncaught exception 'MGLMissingLocationServicesUsageDescriptionException', reason: 'To use location services this app must have a NSLocationWhenInUseUsageDescription string in its Info.plist.'

  1. then we have to add an extra key on Info.plist: Screenshot 2022-08-24 at 12 46 12
Marcelhozeman commented 1 year ago

@odemolliens I updated the Getting Started, see: https://github.com/flitsmeister/flitsmeister-navigation-ios. I also tested this with the code i added to the Sample code. I hope this helps you further?