更改product_name结果未找到目标c模块'错误

发布于 2025-02-03 16:47:44 字数 1372 浏览 2 评论 0原文

我有两个针对我的海关框架的目标,代码库在两者中都相同,但是最小。部署目标版本不同。

目标:

  1. myFrameWork-debug:产品名称: myFramework_debug 产品模块名称:myFramework
  2. myframework-workerwork-workerwork-worke-rame-worke-rease < /code>:产品名称:myFramework < /code>产品模块名称:myFramework < /code>

现在问题是,我拥有带有C ++ /Objective C /Swift的混合代码库。我已经将一些目标C标头进口到伞标头MyFramework.h。 现在定义模块=是

现在,当我编译和运行发布目标时,它可以正常工作。但是,当我编译调试目标时,它显示了错误&lt; nokoom&gt;:0:错误:基础Objective-C模块“ myframework”找不到

我已经仔细检查了构建文件夹,我在自动生成的moudlemap文件中看到了有效的模块,并且看到伞状标头在我的框架下导出了myframework_debug.framework.framework/headers

为什么会发生这种情况?我保留了product_module_name相同的工作,所以它应该工作正确吗?仅更改product_name只能更改框架文件夹的名称,并且不应该实际影响代码吗?我想念什么?

ps: 如果我保持调试目标的产品名称相同,即myFramework,那么当我构建整个项目时,它说多个命令生成文件。 (两个目标写入同一框架?)

侧面注:

为什么两个具有相同代码库的目标? 我使用的是金属,大多数金属类都在模拟器上不支持&lt; ios13,但我的框架旨在具有部署目标ios11。因此,我有两个目标:

  1. myFramework-debug:设备 +模拟器min版本:iOS 13
  2. myFramework-ramework-real :设备仅最小版本:iOS 11 我的客户端应用程序具有最低版本iOS11,因此可以确保在代码库上工作的其他开发人员可以在模拟器中运行该应用,而不必担心框架的支持。

I have two targets for my customs Framework, codebase is identical for both but min. deployment target version is different.

Targets:

  1. MyFramework-Debug: Product Name: MyFramework_Debug Product Module Name: MyFramework
  2. MyFramework-Release: Product Name: MyFramework Product Module Name: MyFramework

Now issue is, I have hybrid code base with C++ / Objective C / Swift. I have imported some of my Objective C headers to Umbrella header MyFramework.h. And Defines Modules = YES

Now when I compile and run Release Target it works fine. But when I compile Debug Target it shows error <unknown>:0: error: underlying Objective-C module 'MyFramework' not found.

I have double checked the build folder, I see valid Module in auto generated moudlemap file and I see that umbrella header is exported under my framework MyFramework_Debug.framework/Headers.

Why is this happening? I have kept PRODUCT_MODULE_NAME same hence it should just work right? Changing only PRODUCT_NAME should only change the framework folder's name and shouldn't actually affect the code right? What am I missing?

PS:
if I keep debug target's product name the same, i.e. MyFramework, then when I build whole project it says multiple commands generate file. (Both targets writing to same framework?)

Side note:

Why two targets with identical codebase?
I'm using metal, and most of the Metal classes are not supported on simulator < iOS13, but my Framework is intended to have deployment target iOS11. Hence, I have two targets:

  1. MyFramework-Debug: Device + Simulator min version: iOS 13
  2. MyFramework-Release: Device only min version: iOS 11
    My client app has min version iOS11, hence it ensures that other devs who work on code base can run the app in simulator without having to worry about Framework's support.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文