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

Can't use react-native-mapbox-gl and MapboxNavigation with CocoaPods #2016

Closed
ClementPF opened this issue Mar 11, 2019 · 16 comments
Closed

Can't use react-native-mapbox-gl and MapboxNavigation with CocoaPods #2016

ClementPF opened this issue Mar 11, 2019 · 16 comments

Comments

@ClementPF
Copy link

Mapbox Navigation SDK version: 0.29.1
react-native-mapbox-gl 6.1.3

Hello, I'm having an issue trying to use the Mapbox iOS Navigation along with the react-native-mapbox-gl module with CocoaPods.

Trying to use them together throws
[!] The 'Pods-abcd' target has frameworks with conflicting names: mapbox.framework.

Steps to reproduce:

  1. react-native init abcd
  2. cd abcd && npm install @mapbox/react-native-mapbox-gl --save
  3. cd ios && touch Podfile
  4. Copy the following into the Podfile located abcd/ios/Podfile
platform :ios, '9.0'

target 'abcd' do

  use_frameworks!
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'RCTImage'
    # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  # Mapbox
  pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'
  pod 'MapboxNavigation', '~> 0.29.0'
end
  1. pod install
  2. Notice [!] The 'Pods-abcd' target has frameworks with conflicting names: mapbox.framework. preventing the creation of the .xcworkspace

Expected behavior:

The two SDKs should be able to be used together.

Thanks !

@1ec5
Copy link
Contributor

1ec5 commented Mar 13, 2019

RNMBGL v6.x depends on a very old version of the iOS map SDK. v7.x will likely be based on a compatible version. It’s being developed in nitaliano/react-native-mapbox-gl#1377; see nitaliano/react-native-mapbox-gl#1238 (comment) for the latest progress update. I’m closing this issue because there’s nothing the navigation SDK project can do about a downstream project’s dependency management.

@1ec5 1ec5 closed this as completed Mar 13, 2019
@1ec5
Copy link
Contributor

1ec5 commented Mar 13, 2019

Additionally, the incompatibility reported by CocoaPods is caused by the fact that RNMBGL is distributed as Mapbox.framework, which happens to be the same bundle name that the iOS map SDK uses. CocoaPods requires each framework embedded within an iOS application target to have a distinct name. (This is a best practice for iOS applications in general.) nitaliano/react-native-mapbox-gl#1535 is sufficient for tracking this issue.

@Jackyaung
Copy link

I still didn't get how to solve the problem, even I checked all the links above.

@DavidKHahn
Copy link

@1ec5 is there any update to this upcoming update? Currently trying to bridge together mapbox-react-native + navigation into a single application. Any leads would be appreciated.

@martinezguillaume
Copy link

I'm searching too how to implement mapbox navigation sdk into react-native, if someone has some advice

@clarodanesh
Copy link

You should check this repository out

https://github.com/SRHealth/react-native-mapbox-navigation

@DavidKHahn
Copy link

@clarodanesh does this work for with mapbox + navigation? seems like the documentation is non-existant can you state how the package/properties are used?

@clarodanesh
Copy link

@DavidKHahn Yes it uses the mapbox navigation sdk. I havent played around with it much yet, I have only followed the bare installation steps and have got the navigation working on an Android phone.

@deriksadiki
Copy link

@clarodanesh i checked out your link and it is working on my device after cloning it but how do i use it on a different project?

@Davidvision
Copy link

I’m trying to do exactly the same, any advice on how to implement it would be greatly appreciated.

@iutin
Copy link

iutin commented Nov 22, 2019

@clarodanesh i checked out your link and it is working on my device after cloning it but how do i use it on a different project?

Hi! Do you have any progress? I have the same question now(

@deriksadiki
Copy link

nope no progress so far, I ended up creating a custom navigation but its not that brilliant since the map doesn't move according to the path (road) , if the road is a curve, the pin still moves straight, you have to rotate the map manually

@clarodanesh
Copy link

@iutin @deriksadiki hi guys, Im in the same situation, havent implemented this in another project, only used the cloned repository.

@adhendo
Copy link

adhendo commented Oct 30, 2020

@clarodanesh @deriksadiki or anyone else, do you have a link to https://github.com/SRHealth/react-native-mapbox-navigation repository? it seems to be missing now...

@deriksadiki
Copy link

@clarodanesh @deriksadiki or anyone else, do you have a link to https://github.com/SRHealth/react-native-mapbox-navigation repository? it seems to be missing now...

i do not have it, maybe he deleted the repo

@clarodanesh
Copy link

@clarodanesh @deriksadiki or anyone else, do you have a link to https://github.com/SRHealth/react-native-mapbox-navigation repository? it seems to be missing now...

Hi, no unfortunately, it seems to have been deleted now. I dont have a downloaded or cloned copy either.

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

10 participants