ios - ld : library not found for -lreact-native-fetch-blob with pods?

标签 ios xcode react-native cocoapods react-native-fetch-blob

我刚刚结束了 android 的工作并转向了 Xcode,使用它非常具有挑战性。我也不熟悉 pod,但我知道当我安装它们时,我从日志中得到了这个:

    Fetching podspec for `RNVectorIcons` from `../node_modules/react-native-vector-icons`
Fetching podspec for `react-native-fetch-blob` from `../node_modules/react-native-fetch-blob`
Downloading dependencies
Installing QBImagePickerController (3.4.0)
Using RNVectorIcons (4.5.0)
Installing RSKImageCropper (2.1.0)
Installing React (0.11.0)
Using react-native-fetch-blob (0.10.6)

我读到,因为我有带 fetch-blob 的 pod,所以我不需要使用 .xcodeproj,而是使用 .xcworkspace。我从侧面板中删除了 .xcodeproj,并从 Link Binary With Libraries 中删除了 .a。我如何知道我是否在使用 .xcworkspace?

这里是错误:

    ld: warning: directory not found for option '-L/Users/laneyw/Desktop/ReactProjects/exampleapp/ios/build/Build/Products/Debug-iphonesimulator/RNVectorIcons'
ld: warning: directory not found for option '-L/Users/laneyw/Desktop/ReactProjects/exampleapp/ios/build/Build/Products/Debug-iphonesimulator/React'
ld: warning: directory not found for option '-L/Users/laneyw/Desktop/ReactProjects/exampleapp/ios/build/Build/Products/Debug-iphonesimulator/react-native-fetch-blob'
ld: library not found for -lreact-native-fetch-blob

最佳答案

当您打开 xcode 时,点击“打开另一个项目”,然后在 finder 中导航到您的 .xcworkspace 文件 enter image description here

在我的例子中,蓝色和白色“A”是 xcodeproj,白色和蓝色“A”是 .xcworkspace

关于ios - ld : library not found for -lreact-native-fetch-blob with pods?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52012566/

相关文章:

javascript - 仅在 Expo react native 中将渐变应用于文本

ios - Swift 项目中的 AFNetorking -- "Error: Request failed: unacceptable content-type: text/html"

ios - 无法重新排序 Collection View 单元格

ios - NSUserActivity 缺少 contentAttributeSet 属性

ios - Xcode UI 不显示我创建的核心数据实体

ios - UIImageview 动画开始使用 for-in 循环和动画延迟

ios - 键值观察外观类上的静态 NSDictionary

ios - NSAttributedString 初始化数据 :options:documentAttributes:error: is executing very slowly

javascript - 当我运行 npm run start 时出现此错误

reactjs - 如何设置纬度/经度增量以显示路线坐标?