1. Open XCode --> To Libraries add `$LibraryWhichDoesNotWork.xcodeproj$`
2. Then for your app in the `Build Phases` add to the `Link Binary with Libraries` the file `lib$LibraryWhichDoesNotWork$.a`
在对新的依赖项运行 pod install命令之后,出现了这个错误。除此之外,还安装了 React。因此,Xcode 可能被混淆为 path。我从 PodFile 中删除了这些行,错误消失了。请注意,那些从这里删除的已经在 Xcode 链接。
target 'app' do
pod 'GoogleMaps'
pod 'Firebase/Auth', '~> 6.3.0'
pod 'Firebase/Database', '~> 6.3.0'
# Removed four pods below and it worked.
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
pod 'RNFS', :path => '../node_modules/react-native-fs'
end
我重写了这些值,看起来删除之后它们又回到了默认值。另外,Cocoapods 在 pod install之后用终端中的消息抱怨它:
[!] The `app [Release]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-app/Pods-app.release.xcconfig'. This can lead to problems with the CocoaPods installation
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'app' do
# Pods for app
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
target 'appTests' do
inherit! :search_paths
# Pods for testing
end
# Pods for staging app // important line below
target 'app.staging'
use_native_modules!
end