如何在Podfile中选择一个项目?我遇到了这个错误:无法找到目标“Pods”的Xcode项目。

40

我正在进行Ray Wenderlich的SimpleWeather教程。
Podfile与项目位于同一文件夹中。 以下是我的Podfile代码:

platform :ios, '7.0'

xcodeproj 'SimpleWeather'  

pod 'Mantle'  
pod 'LBBlurredImage'  
pod 'TSMessages'  
pod 'ReactiveCocoa'  

错误信息如下:[!] 无法找到目标Pods的Xcode项目/Users/myName/Developer/SimpleWeather.xcodeproj

该项目的名称为SimpleWeather。


你的项目名称是什么?Pods文件的位置在哪里? - kukido
我已经尝试将Podfile放置在SimpleWeather和Developer两个文件夹中。 - meghan66
将其移动到您的SimpleWeather项目目录中,注释掉xcodeproj,然后运行$ pods install即可。 - kukido
我已经运行了pod install命令,包括和不包括xcode项目行。 - meghan66
当您在没有 xcodeproj 的情况下运行 pod install 时,会出现什么错误?我假设您是从 /Users/myName/Developer/SimpleWeather 运行它的。 - kukido
显示剩余4条评论
12个回答

0
希望这个答案能够在许多人使用SPM的时候有用。我的情况是这样的:我有一个二进制框架包,必须将其与其依赖树一起转换为cocoapod。在包所在的git存储库中,.gitignore文件包含以下行:/*.xcodeproj。这意味着即使一切在本地都正常工作,每当CI尝试运行pod install时,它都会失败。

0

请检查您的 Podfile 是否包含以下内容

config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

下面

目标'<项目名称>'做


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接