ios - 创建新方案后找不到 Pod?

标签 ios swift xcode cocoapods

我刚刚决定创建几个具有不同配置的不同方案。但是,当我尝试构建它时,它会出现“没有这样的模块‘podname’”。

我关注了this指南,并尝试在添加配置文件的步骤之前构建。任何想法为什么我的 pod 没有被识别?我创建的新方案名称为“开发”、“测试”和“生产”。

这是我的 podfile 的样子:

enter image description here

当我运行 Pod install 时,我收到以下消息:

[!] Automatically assigning platform `ios` with version `10.0` on target `NoteIt` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (development).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (development).xcconfig` in your build configuration (`NoteIt/Development.xcconfig`).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (test).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (test).xcconfig` in your build configuration (`NoteIt/Test.xcconfig`).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (production).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (production).xcconfig` in your build configuration (`NoteIt/Production.xcconfig`).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(development).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(development).xcconfig` in your build configuration (`NoteIt/Development.xcconfig`).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(test).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(test).xcconfig` in your build configuration (`NoteIt/Test.xcconfig`).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(production).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(production).xcconfig` in your build configuration (`NoteIt/Production.xcconfig`).

[!] The `NoteIt [Debug (Development)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (development).xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `NoteIt [Debug (Test)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (test).xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `NoteIt [Debug (Production)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (production).xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `NoteIt [Release(Development)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(development).xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `NoteIt [Release(Test)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(test).xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `NoteIt [Release(Production)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(production).xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

在清理后构建时出现以下错误:

enter image description here

我的配置设置如下所示:

enter image description here

最佳答案

删除.xcworkspacePodfile.lockPods/目录。一旦完成做

pod install

现在,打开新生成的 .xcworkspace 文件,并在您自己的 .xcconfig 文件中添加 Cocoapods 的 .xcconfig 路径。

有关解决此问题的更多详细信息,您可以引用link . 这将解决问题。

快乐编码:)

关于ios - 创建新方案后找不到 Pod?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52780518/

相关文章:

ios - 在 UITableView 中的 UINib 中重新加载 UITableView

iphone - 使用 GDataXML 在 Objective C 中更改 xml 中的属性值

ios - 在另一个项目中使用一个项目的应用程序委托(delegate)/ View Controller

ios - 当步数更新时调用一些东西

c++ - 如何在静态库中的单独 cpp 文件中链接未引用的变量?

xcode - XCode 中的代码签名错误 - 是否与 Apple 开发者网站关闭有关

ios - 如何快速重新使用变量构建数组

ios - Swift:嵌套类型删除

ios - App Transport Security 阻止通过自定义 url 方案进行路由

swift - 为什么我的 Swift 网络请求不起作用?