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

        • <bdo id='0a24r'></bdo><ul id='0a24r'></ul>
      1. <small id='0a24r'></small><noframes id='0a24r'>

        <legend id='0a24r'><style id='0a24r'><dir id='0a24r'><q id='0a24r'></q></dir></style></legend>
        <tfoot id='0a24r'></tfoot>

        带有嵌套嵌入式框架的 iOS 8+ 框架

        时间:2023-05-19

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

                  <tbody id='zWWSn'></tbody>
              1. <legend id='zWWSn'><style id='zWWSn'><dir id='zWWSn'><q id='zWWSn'></q></dir></style></legend>
                  <tfoot id='zWWSn'></tfoot>

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

                  本文介绍了带有嵌套嵌入式框架的 iOS 8+ 框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我创建了一个自定义 iOS 框架 LoginKit.反过来,它在下面嵌入了 Alamofire 框架.在模拟器中,一切正常,但尝试在设备上运行时,出现错误:

                  I have created a custom iOS framework LoginKit. It, in turn embeds Alamofire framework underneath. In the simulator, everything works fine, but when trying to run on the device, I get the error :

                  Dyld 错误信息:

                    Library not loaded: @rpath/Alamofire.framework/Alamofire
                    Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/506B47DE-804F-477F-AA90-69DF039E07FA/data/Containers/Bundle/Application/26D0CA8F-7284-42B5-8091-E5915736DCDB/Bingo.app/Bingo
                    Reason: image not found 
                  

                  在父应用程序的 Embedded Binaries 部分中,我只有 LoginKit.framework .现在,如果我还嵌入了 Alamofire.framework(取自 LoginKit 下方),错误就会消失.这种行为是预期的吗?它不会破坏这里封装的全部目的吗?

                  In the parent app, in the Embedded Binaries section, I have only LoginKit.framework . Now, if I also embed Alamofire.framework (taken from underneath LoginKit), the error goes away. Is this behavior expected ? Does it not defeat the whole purpose of encapsulation here ?

                  推荐答案

                  您尝试创建的内容称为 Umbrella Framework.通过一些技巧和自定义 bash 脚本的使用,您可以创建一个具有嵌套框架的框架,如 这里.

                  What you are trying to create is called an Umbrella Framework. With some hacks and usage of a custom bash script you can create such a framework with nested frameworks as described here.

                  但是,Apple 强烈反对 创建伞形框架,因为这种方法可以创建所有奇怪的运行时和/或链接错误.此外,很明显,如果您的应用程序包含多个嵌入相同框架甚至不同版本的相同框架的框架,您的应用程序将变得更大且更难维护.可以在这里找到这些问题的一个很好的解释.

                  However, Apple highly discourages to create umbrella frameworks because this method can create all kings of weird runtime and / or linking errors. Also, it is quite obvious that your application will become larger and harder to maintain if it contains several frameworks embedding the same framework or even the same framework in different versions. A good explanation of these problems can be found here.

                  目前,包含框架的框架仍然是应用程序开发中的一个大问题,因为苹果没有提供良好的框架处理.在这个问题最终解决之前,我强烈建议将所有框架和子框架直接嵌入到应用程序中.

                  Currently, frameworks containing frameworks are still a big problem in app development because Apple does not provide good framework handling. Until this problem is finally solved I strongly recommend to embed all frameworks and subframeworks directly in the application.

                  这篇关于带有嵌套嵌入式框架的 iOS 8+ 框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Parse.framework iOS 的链接错误 下一篇:在框架中嵌入框架(iOS 8+)

                  相关文章

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

                • <tfoot id='KLdw9'></tfoot>
                  <legend id='KLdw9'><style id='KLdw9'><dir id='KLdw9'><q id='KLdw9'></q></dir></style></legend>

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

                  1. <small id='KLdw9'></small><noframes id='KLdw9'>