Giter VIP home page Giter VIP logo

Comments (14)

rossmartin avatar rossmartin commented on May 22, 2024 4

@zoolle @dslapelis This issue has been resolved in the latest version (1.0.2) and use_frameworks! is no longer needed. There are also some additional notes to resolve potential build issues for ios - https://github.com/homeeondemand/react-native-mapbox-navigation#ios-specific-instructions

from react-native-mapbox-navigation.

zoolle avatar zoolle commented on May 22, 2024 1
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
install! 'cocoapods', :disable_input_output_paths => true

target 'myapp' do
  use_unimodules!
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  pre_install do |installer|
    $RNMBNAV.pre_install(installer)
  end

  # Uncomment the code below to enable Flipper.
  #
  # You should not install Flipper in CI environments when creating release
  # builds, this will lead to significantly slower build times.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work.

  # use_flipper!({ 'Flipper' => '0.74.0' })
  # # use_flipper!
  #  post_install do |installer|
  #    flipper_post_install(installer)
  #  end

  post_install do |installer|
    $RNMBNAV.post_install(installer)
    installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
     end
    end
   end
end

Try to run it like this

from react-native-mapbox-navigation.

rossmartin avatar rossmartin commented on May 22, 2024

Can you confirm what version of cocoapods you are using? You can run pod --version in terminal.

from react-native-mapbox-navigation.

zoolle avatar zoolle commented on May 22, 2024

@rossmartin I am using 1.10.1

from react-native-mapbox-navigation.

zoolle avatar zoolle commented on May 22, 2024

@rossmartin I have just installed in a fresh react native project but same error. I've followed these steps.

  1. npx react-native init MyApp

  2. Installed react-native-mapbox-navigation

  3. Created the Bridge file

  4. Run pod install

  5. While building I've got the multiple commands produce error

  6. Added install! 'cocoapods', :disable_input_output_paths => true

  7. Run pod install

  8. While building no error

  9. After installed the app on device same error Library not loaded: @rpath/MapboxMobileEvents.framework/MapboxMobileEvents

from react-native-mapbox-navigation.

rossmartin avatar rossmartin commented on May 22, 2024

Thank you for the details. Do you happen to have other pods in this new RN project? What version of Xcode? You can post your Podfile if you'd like.

from react-native-mapbox-navigation.

zoolle avatar zoolle commented on May 22, 2024

Here it is. Nothing apart of what was installed but react-native init

I am using xCode 12.3

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
project 'driver.xcodeproj' 
install! 'cocoapods', :disable_input_output_paths => true
target 'driver' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'driverTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  # use_flipper!
  # post_install do |installer|
  #   flipper_post_install(installer)
  # end
end

target 'driver-tvOS' do
  # Pods for driver-tvOS

  target 'driver-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

from react-native-mapbox-navigation.

rossmartin avatar rossmartin commented on May 22, 2024

Thanks for posting. I don't see any smoking guns with the info you've shared. It's been a really long day here and I'm out of ideas currently. I'll revisit when I get a chance.

from react-native-mapbox-navigation.

zoolle avatar zoolle commented on May 22, 2024

@rossmartin So now I've updated my xCode to 12.4 and I've tried even on simulator but same thing. I also managed to make it work somehow last night until I've cleaned up the project and build again as I had issues with language. After that same error

from react-native-mapbox-navigation.

dslapelis avatar dslapelis commented on May 22, 2024

I also have this same error. Same steps to reproduce.

from react-native-mapbox-navigation.

rossmartin avatar rossmartin commented on May 22, 2024

@zoolle and @dslapelis can you please try adding use_frameworks! to the top of your Podfile? Ex -

platform :ios, '10.0'
use_frameworks!

from react-native-mapbox-navigation.

dslapelis avatar dslapelis commented on May 22, 2024

Thank you @rossmartin! I was just able to successfully build.

from react-native-mapbox-navigation.

MikeRayUX avatar MikeRayUX commented on May 22, 2024

Having this issue also, however my application is an ejected expo project with many dependencies.
It works great for me on Android though not on iOS. I'd also note that with iOS, there are no build issues prior to adding this package.

I've also followed the iOS specific instructions properly and have made several attempts and double checks ensuring that all of the build setting's keys and values match the README instructions.

Error:

dyld: Library not loaded: @rpath/MapboxMobileEvents.framework/MapboxMobileEvents
  Referenced from: /private/var/containers/Bundle/Application/3F887212-3BDA-4339-A628-BA5C3C08BBD9/myapp.app/Frameworks/Mapbox.framework/Mapbox
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb) 

--versions:
Xcode: 12.4
Xcode build system: New Build System
pod: 1.10.1
@homee/react-native-mapbox-navigation: ^1.0.5
react-native: 0.63.4
My PodFile:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
install! 'cocoapods', :disable_input_output_paths => true

target 'myapp' do
  use_unimodules!
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  # Uncomment the code below to enable Flipper.
  #
  # You should not install Flipper in CI environments when creating release
  # builds, this will lead to significantly slower build times.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work.

  # use_flipper!({ 'Flipper' => '0.74.0' })
  # # use_flipper!
  #  post_install do |installer|
  #    flipper_post_install(installer)
  #  end

  post_install do |installer|
    installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
     end
    end
   end
end

from react-native-mapbox-navigation.

MikeRayUX avatar MikeRayUX commented on May 22, 2024

It worked! I'm quite surprised as $RNMBNAV previously returned undefined for me during early troubleshooting.

from react-native-mapbox-navigation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.