首页 > 解决方案 > 创建新方案后找不到 Pod?

问题描述

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

我已遵循指南,并尝试在添加配置文件的步骤之前进行构建。任何想法为什么我的豆荚没有被识别?我创建的新方案名为“开发”、“测试”和“生产”。

这就是我的 podfile 的样子:

在此处输入图像描述

当我运行 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.

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

在此处输入图像描述

我的配置设置如下所示:

在此处输入图像描述

标签: iosswiftxcodecocoapods

解决方案


删除.xcworkspace,Podfile.lockPods/目录。一旦完成

pod install

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

有关解决此问题的更多详细信息,您可以参考链接。这将解决问题。

快乐编码:)


推荐阅读