简体   繁体   English

Xcode 链接器命令失败 - 找不到目录

[英]Xcode Linker command failed - Directory not found

I am using auth0 on a React Native iOS project, and I have completed the following steps:我在 React Native iOS 项目上使用 auth0,我已经完成了以下步骤:

First you need to run the following command to install react-native-lock npm install --save react-native-lock首先需要运行以下命令安装 react-native-lock npm install --save react-native-lock

After that, link react-native-lock with your iOS project: react-native link react-native-lock之后,将 react-native-lock 与您的 iOS 项目react-native link react-native-lockreact-native link react-native-lock

When running the above, cocoapods installs a few dependencies which all install successfully:运行上述命令时,cocoapods 会安装一些依赖项,它们都安装成功:

Adding Podfile to iOS project
Installing Pods
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.1.0)
Using Lock (1.28.2)
Using Masonry (0.6.4)
Using SimpleKeychain (0.7.0)
Using TouchIDAuth (0.2.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 4 dependencies from the Podfile and 5 total pods installed.

In my Project > Build Settings > Other Linker Flags I have:在我的Project > Build Settings > Other Linker Flags我有:

lc++
${inherited}
-ObjC

However, when I build the project to my physical iPhone, I get this error for every installed dependency:但是,当我将项目构建到物理 iPhone 时,每个installed依赖项都会出现此错误:

ld: warning: directory not found for option '-L/Users/dan/Library/Developer/Xcode/DerivedData/myapp-acmwajylejkvendtsdryuouwuvnl/Build/Products/Debug-iphoneos/AFNetworking'

suggestion :建议 :

after u update please open the yourProject.xcworkspace not yourProject.xcodeproject更新后请打开yourProject.xcworkspace而不是yourProject.xcodeproject

Great, you have to update your OS for supporting fluently the XCODE 8.2.1 and above, some times it work within the old OS, i had faced that problem before and i snached all my hair for two days, then i updated my OS and its get fixed.太好了,您必须更新您的操作系统才能流畅地支持 XCODE 8.2.1 及更高版本,有时它可以在旧操作系统中工作,我以前遇到过这个问题,我把头发都抓了两天,然后我更新了我的操作系统和它得到修复。 you have to update your OS for fixing it, else nothing will work.你必须更新你的操作系统来修复它,否则什么都不起作用。

Thanks谢谢

I had this issue after migrating to React Native 61.5 from 59. The introduction of Pods meant that we needed to change out CI (BitRise) iOS build command from:从 59 迁移到 React Native 61.5 后,我遇到了这个问题。 Pod 的引入意味着我们需要从以下位置更改 CI (BitRise) iOS 构建命令:

xcodebuild "-project" "ios/AwesomeProject.xcodeproj" ...

to:到:

xcodebuild "-workspace" "ios/AwesomeProject.xcworkspace" ...

Everything was working fine via XCode locally, just didn't look closely enough that the CI Pipeline script.在本地通过 XCode 一切正常,只是没有仔细观察 CI 管道脚本。 After changing, all was resolved.更改后,一切都解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM