Search code examples
iosreactjsreact-nativecocoapodspodspec

podspec setup for react native geolocation


Sorry for the noob question but I really have no clue how to setup this last bit of line for RN's Geolocation:

If you are using CocoaPods for React Native, make sure to include the RCTGeolocation sub-podspec.

I have a podfile already because I'm following guide from RNfirebase library, but not sure where to add RCTGeolocation.

here's what I currently have:

target 'Absent' do
# Uncomment the next line if you're using Swift or would like to use 
dynamic frameworks
  # use_frameworks!

  # Pods for Absent
    pod 'Firebase/Core', '~> 5.3.0'
    pod 'Firebase/Messaging', '~> 5.3.0'

  target 'AbsentTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

This is my first time customizing a project on mac and interacting with pod files. Any pointers would be greatly appreciated :D


Solution

  • Here is what you are supposed to add in your podfile:

    pod 'React', :path => '../node_modules/react-native', :subspecs => [
      'RCTGeolocation',
    ]
    

    then run pod install