0
votes

I am able to build and run the app in a simulator. However, whenever I want to archive it (selecting any ios devices) to release the app into the AppStore, I am getting this error.

ld: warning: directory not found for option '-L/Users/bigyankarki/Library/Developer/Xcode/DerivedData/Neex-dnesybikpygafkfxhimxsgrjawis/Build/Intermediates.noindex/ArchiveIntermediates/Neex/BuildProductsPath/Release-iphoneos/React-RCTVibration'
ld: warning: directory not found for option '-L/Users/bigyankarki/Library/Developer/Xcode/DerivedData/Neex-dnesybikpygafkfxhimxsgrjawis/Build/Intermediates.noindex/ArchiveIntermediates/Neex/BuildProductsPath/Release-iphoneos/react-native-safe-area-context'
ld: library not found for -lReact-RCTVibration
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have followed this, and other multiple solutions with the same library not found error, but to no avail. I even included it to 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, '12.4'

target 'Neex' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'


  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-async-storage/async-storage'

  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

  pod 'RNSVG', :path => '../node_modules/react-native-svg'

  target 'NeexTests' 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)
  end
end

and even linked it in buildphase, but none works. enter image description here