ld:警告:找不到选项“-F~/Documents/FacebookSDK”的目录 - react-native - ios

ld: warning: directory not found for option '-F~/Documents/FacebookSDK' - react-native - ios

自从我升级了我的应用程序的 react-native 版本后,我一直在尝试处理很多问题。 其中之一就是突然冒出来的这个!

ld:警告:找不到选项“-F~/Documents/FacebookSDK”的目录

其次是这些(造成了额外的混乱)

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

我该如何解决这个问题?

我进行了一些谷歌搜索并使用了一些技巧来尝试解决它。他们中的大多数人没有工作。所以我决定分享对我有用的解决方案。

引自另一个 SO 讨论:

if your error includes the -L flag, then delete the values in Library Search Paths if your error includes the -F flag, then delete the values in Framework Search Paths

我检查了 框架搜索路径 构建设置 下的值 是这样的:

对于发布和调试配置。 我从发布和调试配置中删除了 FacebookSDK 的行(第 3 行),并做了另一个 react-native run-ios。 它奏效了!

希望对您有所帮助...