未加载自定义框架dyld:未加载库:@ rpath/Custom.framework/ [英] Custom framework not loaded dyld: Library not loaded: @rpath/Custom.framework/

查看:206
本文介绍了未加载自定义框架dyld:未加载库:@ rpath/Custom.framework/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有多个自定义动态框架的应用程序,这意味着我将iOS 8用作Xcode 6.2上的SDK.我的Mac在优胜美地上.这些框架具有Swift的资源和资源.

I have an app with several custom dynamic frameworks which means I am using iOS 8 as the SDK on Xcode 6.2. My Mac is on Yosemite. The frameworks have Swift sources and resources.

该应用是分布式企业,因此我只需创建一个IPA,然后通过网页在内部进行分发,用户可以在该网页上下载和安装该应用.

The app is distributed enterprise so I just create an IPA and distribute internally via a webpage where the user can download and install the app.

该应用程序可以在iPhone 5(iOS 8.1.2),iPod Touch(iOS 8.2)和模拟器但不能在iPhone 6(iOS 8.1.2)上安装并运行.该错误始终是dyld:库未加载:@ rpath/Custom.framework/.每当我删除并重新添加框架以尝试对其进行修复时,就会弹出另一个未在iPhone 6上加载的框架.(为什么!)

The app installs and runs on iPhone 5(iOS 8.1.2), iPod Touch(iOS 8.2) and simulators BUT NOT on iPhone 6(iOS 8.1.2). The error is always dyld: Library not loaded: @rpath/Custom.framework/. Whenever I remove and add the frameworks back to try to fix it another framework pops up as not loaded on the iPhone 6. (Why!!!)

已设置以下内容:

  • @ executable_path/Frameworks
  • 嵌入的内容包含Swift代码-是
  • 嵌入式二进制文件中的框架
  • 嵌入式框架
  • 将二进制文件与库链接

造成这些问题的原因是什么,我该怎么做以确保该应用程序在所有设备和iOS 8版本上始终运行.

What is causing these issues and what can I do to make sure that the app runs consistently on all devices and iOS 8 versions.

我找到的大多数解决方案都是反复试验的建议.

Most of the solutions I find are trial and error suggestions.

推荐答案

直到读完有关体系结构的文章,我才停止寻找问题的原因.因此,它提示我在连接iPhone 6时构建框架.我创建了一个具有所有默认值的项目.添加了两个框架,包括Alamofire.在连接iPhone 6时建造它们.生成了存档,并部署并安装了OTA.安装该应用程序后,它可以正常运行.

I didn't stop figuring out the cause of the issue until I read about architectures. So it prompted me to build the frameworks while an iPhone 6 is connected. I created a project with all the defaults. Added a couple of frameworks including Alamofire. Built them while iPhone 6 connected. Generated an archive and deployed and installed OTA. When the app was installed it ran without issues.

我试图通过对我的iPod(MD717ZP/A)进行构建来确认这一点.我不确定这是否是第五代.首先我清空派生的数据文件夹,清理所有项目,包括框架.生成并部署了该应用程序.将其安装在正在运行的iPod上.我将其安装在iPhone 6上,并立即崩溃了.

I tried to confirm it by building against my iPod(MD717ZP/A). I'm not sure if this was 5th Gen. First I emptied the derived data folder, Cleaned all projects including the frameworks. Built and deployed the app. Installed it on the iPod it was running. I installed it on the iPhone 6 and it crashed instantly.

我一遍又一遍地尝试了相同的过程.首先针对iPhone 6进行构建,然后针对两者安装iPod.结果只是证实了我需要在iPhone 6上构建它,以便该应用程序可以在该设备上运行并在更低版本上运行.

I tried the same process over and over again. Built against iPhone 6 then iPod then installed on both. The results just confirmed that I need to have it built on iPhone 6 so the app would run on that device and lower.

请记住,我只是确实将框架添加到了嵌入式二进制文件"(目标">通用">嵌入式二进制文件"),然后在iPhone 6上构建以使其正常工作.由于某些体系结构要求,这可能意味着您需要拥有最新的设备(如果要使其在所有设备上运行).

Remember I ONLY did add the frameworks to "Embedded Binaries" (Target > General > Embedded Binaries) then built on iPhone 6 to make it work. This could mean you need to have the latest device if you want it running on all devices due to some architecture requirements.

更新: 除了上述知识之外,您可能还需要检查 Build Settings (构建设置)标签中的"仅构建活动体系结构"部分.这意味着如果设置为YES,它将基于连接的硬件进行构建,否则它将针对您支持的体系结构(例如有效体系结构)进行构建.

Update: In addition to the knowledge above you may want to check the "Build Active Architecture Only" section in the Build Settings tab. It means it will build based on the connected hardware if set to YES else it will build for the architectures you support like Valid Architectures.

这篇关于未加载自定义框架dyld:未加载库:@ rpath/Custom.framework/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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