After upgrading React Native version (0.60.0 > 0.66.4) Xcode linker command failed error

Viewed 259

I am trying to upgrade my react native project 0.60.0 to 0.66.4 I applied changes from RN Upgrade Helper. Android builded successfully but ios build give some error like

ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/erp-cdjhsiozphdzhmaqcgypmtcgnftq/Build/Products/Debug-iphonesimulator/Folly'
ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/erp-cdjhsiozphdzhmaqcgypmtcgnftq/Build/Products/Debug-iphonesimulator/React'
ld: library not found for -lcc+
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Xcode version 13.2.1

Podfile:

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

platform :ios, '11.0'

target 'erp' do
  config = use_native_modules!

  # react-native-maps dependencies
  pod 'react-native-google-maps', path: '../node_modules/react-native-maps'  # Remove this line if you don't want to support GoogleMaps on iOS
  pod 'GoogleMaps'  # Remove this line if you don't want to support GoogleMaps on iOS
  pod 'Google-Maps-iOS-Utils' # Remove this line if you don't want to support GoogleMaps on iOS
  pod 'RCT-Folly', :podspec => '../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec'

  pod 'Firebase/Messaging'

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )
  
  target 'erpTests' 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 the next line.
  use_flipper!()
  
  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end

end

I tried delete DerivedData, Pods, Podfile.lock then pod install, also remove all other linker flags from xcode but still i have the error. Any suggestions ?

0 Answers
Related