<tfoot id='ASKUC'></tfoot>
    <legend id='ASKUC'><style id='ASKUC'><dir id='ASKUC'><q id='ASKUC'></q></dir></style></legend>

    1. <i id='ASKUC'><tr id='ASKUC'><dt id='ASKUC'><q id='ASKUC'><span id='ASKUC'><b id='ASKUC'><form id='ASKUC'><ins id='ASKUC'></ins><ul id='ASKUC'></ul><sub id='ASKUC'></sub></form><legend id='ASKUC'></legend><bdo id='ASKUC'><pre id='ASKUC'><center id='ASKUC'></center></pre></bdo></b><th id='ASKUC'></th></span></q></dt></tr></i><div id='ASKUC'><tfoot id='ASKUC'></tfoot><dl id='ASKUC'><fieldset id='ASKUC'></fieldset></dl></div>

        <small id='ASKUC'></small><noframes id='ASKUC'>

          <bdo id='ASKUC'></bdo><ul id='ASKUC'></ul>

        Swift 项目:“缺少必需的模块";导入模块化框架时

        时间:2023-05-17
          <tbody id='hOaKU'></tbody>
            <bdo id='hOaKU'></bdo><ul id='hOaKU'></ul>
            <i id='hOaKU'><tr id='hOaKU'><dt id='hOaKU'><q id='hOaKU'><span id='hOaKU'><b id='hOaKU'><form id='hOaKU'><ins id='hOaKU'></ins><ul id='hOaKU'></ul><sub id='hOaKU'></sub></form><legend id='hOaKU'></legend><bdo id='hOaKU'><pre id='hOaKU'><center id='hOaKU'></center></pre></bdo></b><th id='hOaKU'></th></span></q></dt></tr></i><div id='hOaKU'><tfoot id='hOaKU'></tfoot><dl id='hOaKU'><fieldset id='hOaKU'></fieldset></dl></div>
            1. <legend id='hOaKU'><style id='hOaKU'><dir id='hOaKU'><q id='hOaKU'></q></dir></style></legend>

                <tfoot id='hOaKU'></tfoot>

                <small id='hOaKU'></small><noframes id='hOaKU'>

                • 本文介绍了Swift 项目:“缺少必需的模块";导入模块化框架时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  设置

                  1. 我创建了一个包含 C 库 (CommonCrypto) 和一个 Objective C 文件的 swift 框架.

                  2. swift 项目中没有桥头.所以我创建了一个 module.modulemap 来将 CommonCrypto 和 Objective-C 文件导入到我的 swift 框架中.

                    module.modulemap 内容:

                  这是 module.modulemap 示例链接:

                  所以,在我的 swift 框架中,一切正常.我可以像这样使用模数

                  问题展示

                  1. 归档模块化框架并作为构建产品导出.

                  2. 在我的 swift 示例项目中,将模块化框架添加到 Embedded Binaries

                  3. 当我在框架内使用某些东西时,此行出现错误

                  我已经尝试了很多解决方案,但仍然无法正常工作.

                  类似的问题:

                  <块引用>

                  1. 备注

                    如果框架存档在同一个开发环境中,则无需将 module.modulemap 添加到示例项目中.

                    Setup

                    1. I create a swift framework which include C library (CommonCrypto) and a Objective C file.

                    2. There is no bridge-header in swift project. So I create a module.modulemap to import CommonCrypto and Objective-C file into my swift framework.

                      module.modulemap content:

                    Here is the module.modulemap sample link:Importing CommonCrypto in a swift framework

                    1. In project settings, adding modulus.modulusmap path to swift compile

                      So, in my swift framework, everything works fine. I can use modulus like this

                    Problem shows

                    1. Archive the modular framework and export as a built products.

                    2. In my swift sample project, add modular framework to Embedded Binaries

                    3. Error occurs on this line when I use something inside the framework

                    I have try so many solutions, but still not work.

                    Similar problems:

                    1. Swift app: "Missing required module" when importing framework that imports static library

                    2. Adding RealmSwift as a subproject: Missing required modules: 'Realm.Private', 'Realm'

                    Is anyone have a good solution for this? Thx!!

                    解决方案

                    Solution

                    iOS framework exists as a folder, create a module.modulemap to find out library or header file.

                    1. Setup module.modulemap path

                      In project/target/Build Settings/Swift Compile - Search Path/Import Path = "${SRCROOT}"

                    2. Add below to module.modulemap

                    Remarks

                    You don't have to add module.modulemap to the sample project if the framework is archived on the same development environment.

                    这篇关于Swift 项目:“缺少必需的模块";导入模块化框架时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:xcodebuild 7.3 无法启用位码 下一篇:嵌入式框架 &lt;iOS 8

                  相关文章

                  1. <tfoot id='V2yYB'></tfoot>

                    <small id='V2yYB'></small><noframes id='V2yYB'>

                      <bdo id='V2yYB'></bdo><ul id='V2yYB'></ul>
                    <i id='V2yYB'><tr id='V2yYB'><dt id='V2yYB'><q id='V2yYB'><span id='V2yYB'><b id='V2yYB'><form id='V2yYB'><ins id='V2yYB'></ins><ul id='V2yYB'></ul><sub id='V2yYB'></sub></form><legend id='V2yYB'></legend><bdo id='V2yYB'><pre id='V2yYB'><center id='V2yYB'></center></pre></bdo></b><th id='V2yYB'></th></span></q></dt></tr></i><div id='V2yYB'><tfoot id='V2yYB'></tfoot><dl id='V2yYB'><fieldset id='V2yYB'></fieldset></dl></div>

                    1. <legend id='V2yYB'><style id='V2yYB'><dir id='V2yYB'><q id='V2yYB'></q></dir></style></legend>