Geofire (iOS) clang: error: linker command failed with exit code 1 (use -v to see the call)

I am using GeoFire (2.0.0) in a Swift project, after today's module update, when the project builds on Xcode shows clang: error: linker command failed with exit code 1 (use -v to view the call) in the Geofire structure. Tell me how can I fix this?

I install Geofire via Cocaopods as follows pod 'GeoFire' ,: git => ' https://github.com/firebase/geofire-objc.git '

Update:

ld: framework not found nanopb
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

      

Update 1 . When I install containers, I see in the terminal that this component is being used

Using nanopb (0.3.8)

      

+3


source to share


1 answer


I was prompted to solve this problem.

I changed my jet strings and solved the geofirm issue. An interesting situation with subsequent updates, it turns out that if you are using Geofire it will not work for updating Firebase in versions higher than 4.0.3

# Firebase
    pod 'Firebase', '4.0.3'
    pod 'Firebase/Core'
    pod 'Firebase/Auth'
    pod 'Firebase/Database'
    pod 'Firebase/Storage'
    # Push notification
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'

      



Update: Second method. You need to write this to a subfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
  if target.name == 'GeoFire' then
    target.build_configurations.each do |config|
      config.build_settings['FRAMEWORK_SEARCH_PATHS'] = "#{config.build_settings['FRAMEWORK_SEARCH_PATHS']} ${PODS_ROOT}/FirebaseDatabase/Frameworks/ $PODS_CONFIGURATION_BUILD_DIR/GoogleToolboxForMac $PODS_CONFIGURATION_BUILD_DIR/nanopb"
      config.build_settings['OTHER_LDFLAGS'] = "#{config.build_settings['OTHER_LDFLAGS']} -framework FirebaseDatabase"
    end
  end
end

      

+2


source







All Articles