Cocoapods-无此类模块“模块”(适用于任何模块) [英] Cocoapods - No Such Module 'module' (for any modules)

查看:54
本文介绍了Cocoapods-无此类模块“模块”(适用于任何模块)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该是经过一个多星期的调试后,才让我为之骄傲并放弃的时候。首先,在有人将此问题标记为重复之前,我意识到这是SO上的常见问题。但是,我几乎阅读了所有类似的问题,并且似乎在尝试对每个给定答案进行变体都无济于事。虽然这个问题看起来令人生畏,但实际上并非如此。我只是选择提供一个详尽的清单,这些清单可能会以透彻的精神为主题。



这是我的问题的根源:


没有这样的模块'ParseUI'


错误消息



差异是据我了解,该框架(以及所有没有这样的模块框架)确实以某种能力存在,如下所示,当我构建该项目并经过编译阶段时:



编译框架



应用程序目标的编译源



话虽如此,为简单起见,我将重点介绍缺少的 ParseUI 模块。



TRIED&失败的解决方案尝试-重新安排构建阶段的顺序



现在,我将显示此框架似乎存在的位置以及执行的步骤:



首先,这些框架是通过cocoapods安装的。这是我的 Podfile



Podfile



运行 pod install 后,一切运行顺利。 ParseUI 位于我的项目中的以下位置:



在项目的 Frameworks目录中(完整路径显示在右侧)



* TRIED& ;失败的解决方案尝试-将位置下拉列表更改为其他所有选项



应用目标的链接库

< a href = https://i.stack.imgur.com/DwTlK.png rel = nofollow noreferrer>



接下来,我将展示一些我认为与框架搜索路径相关的构建设置。由于我对此设置所做的更改似乎都没有任何区别(如下所示),因此它们目前为空白:



项目框架搜索路径



目标框架搜索路径 < br>



目标的其他链接器标记



* TRIED&失败的解决方案尝试-更改项目和目标的构建设置的框架搜索路径,包括以下内容:




  • $(继承)(递归和非递归)

  • $(PROJECT_DIR)(递归和非递归)

  • $(PROJECT_DIR)/ Framework (递归和非递归)

  • $(SRCROOT)(递归和非递归)

  • $(SRCROOT)/框架(递归和非递归)

  • 上述组合



现在在 Pods 项目中进行配置。框架位于 Pods 目录中:



Pod的目录 < br>



框架目标的路径(右侧显示了完整路径)



导航器中广告连播的产品目录



最后是 Pod 的项目搜索路径构建设置:



项目级框架搜索路径



到此为止,所有相关的UI都显示给我。我应该注意几件事:




  • 是的,我正在使用 MyProject.xcworkspace

  • 从尝试这些步骤的次数中,我可以闭上眼睛来清理/清除派生数据/重新启动项目。

  • 我什至完全删除了Pods,并通过cocoapods将其重新安装在干净的板上



我使用的版本是:




  • Cocoapods v1.0.1

  • Xcode v7.3.1

  • Swift v2.2

  • Ruby v2.3.1(是否与Cocoapod相关?)



如果您已经走了这么远,谢谢您花时间跟进。如果您有任何建议,我应该采取,甚至更好。我没办法。

解决方案

请确保您的Pods子项目具有仅构建活动体系结构。 设置为否。


It's time to swallow my pride and give this up after over a week of debugging. To preface, before someone marks this question as a duplicate, I realize that this is a common question on SO. However, I've read practically every similar question and seemingly tried variations on every given answer all to no avail. While this question may look daunting, it's really not. I've simply chosen to provide a fully exhaustive list of things that may or may not be relevant in the spirit of being thorough.

Here is the root of my problem:

No such module 'ParseUI'

error message

The discrepancy is that as far as I understand the framework (and all "no such module" frameworks) does exist in some capacity, as shown below when I build the project and it goes through the compiling stages:

compiling the framework

For context, this is not an error that is specific to ParseUI in file LocalPost.swift (error screenshot above) by any means. If I comment out that import statement in that file, it just throws the error the next place it finds an import for any framework installed via Cocoapods. It only throws this one error because it's the first import statement found in the first line of said file within the "compile sources" section of my target's build phases as shown below:

app target's build phase order

app target's compiled sources

That being said, I will focus on the missing ParseUI module for simplicity's sake.

TRIED & FAILED SOLUTION ATTEMPT - Rearranging the build phase order

Now I'll show where this framework seems to exists along with the steps I took:

First off, these frameworks are installed through cocoapods. Here is my Podfile:

Podfile

After running pod install, everything goes smooth. ParseUI is located in the following places within my project:

Within the project's "Frameworks" directory (full path shown on right)

*TRIED & FAILED SOLUTION ATTEMPT - Changing the location dropdown to every other option

app target's linked libraries

Next, I'll show some build settings that I feel are relevant starting with the framework search paths. Since none of the changes I made for this setting seemed to make any difference (as you'll see below) they are currently blank:

Project framework search paths

Target framework search paths

Target's other linker flags

*TRIED & FAILED SOLUTION ATTEMPT - Changing the framework search paths for both the project and target's build settings including the following:

  • $(inherited) (recursive and non-recursive)
  • $(PROJECT_DIR) (recursive and non-recursive)
  • $(PROJECT_DIR)/Frameworks (recursive and non-recursive)
  • $(SRCROOT) (recursive and non-recursive)
  • $(SRCROOT)/Frameworks (recursive and non-recursive)
  • combinations of the above

Now for configurations within the Pods project. Here is where the framework lies within the Pods directory:

The Pod's directory

The framework target's path (full path shown on right)

The pod's "Product" directory in the navigator

Finally here is the Pod's project search paths build setting:

Project level framework search paths

That concludes all of the relevant UI for me to show. A couple other things I should note:

  • Yes, I'm using MyProject.xcworkspace
  • I could clean/clear derived data/restart my project with my eyes closed from the number of times I've tried those steps.
  • I've even removed Pods entirely and reinstalled it via cocoapods on a clean slate

The versions I am using are:

  • Cocoapods v1.0.1
  • Xcode v7.3.1
  • Swift v2.2
  • Ruby v2.3.1 (if that's Cocoapod-relevant?)

If you've gotten this far, thank you for even taking the time to follow along. If you have a suggestion for any step I should take, even better. I am at my wits end. I'll amend this question with any request information if need be.

解决方案

Make sure your Pods subproject has "Build Active Architecture Only" set to NO.

这篇关于Cocoapods-无此类模块“模块”(适用于任何模块)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆