0

I'm making a framework using iOS-Universal-Framework.

All has been working well for a few days, but today I decided to change a method signature. Xcode seems to have cached the old version of my library/framework, and I can't get it to see my new code for anything. Although the header it presents has the correct signature, the compiler (and autocomplete) do NOT see the correct signature.

I've tried changing the Framework version and Current Library/Compatibility versions of my custom framework. I've cleaned both projects a bunch. Deleted Derived Data. Closed Xcode. Etc...

This is really, really frustrating, as I've now wasted almost 2 hours just trying to get Xcode to behave!

Has anyone encountered this error before? Does anyone know how to get Xcode to see the code I've actually written?

4

2 回答 2

1

我遇到了类似的问题,但在与我的项目输出相同的文件夹中找到了我的自定义框架的缓存版本。

以下是我为解决它而采取的步骤:

  1. 在 Xcode 中右键单击项目构建产品并选择“在 Finder 中显示”以显示构建文件夹。
  2. 在此文件夹中查找自定义框架,然后将其删除。
  3. 清洁和建造。

就我而言,无需更改框架搜索路径或从项目中删除自定义框架。

于 2018-09-01T13:17:25.367 回答
0

啊啊啊啊!为什么总是,总是,我永远搜索却找不到答案。然后,我在 StackOverflow 上发布一个问题,然后自己在 2 分钟内找到答案?

太烦人了!

我通过执行以下操作解决了我的问题:

  1. 从框架搜索路径中清除所有条目(“$(inherited)”除外)。
  2. 从项目中删除自定义框架。
  3. 将自定义框架重新添加到项目中。
  4. 清洁和建造。

我仍然不确定我是否理解 Xcode 如何/为什么做它所做的事情的所有复杂性,但至少现在我的真实代码可以看到并运行!


帮助我的第一个问题是Xcode 引用旧框架

所以,我在“xcode disable automatic framework search”上搜索,发现Xcode 引用了旧的/已删除的框架,导致多个接口声明

我希望这至少可以帮助其他人更快地得到答案。

于 2013-03-22T17:37:52.613 回答