dyld`dyld_fatal_error,iOS 上不兼容的 api 的原因是什么? [英] Which is the cause for dyld`dyld_fatal_error, a incompatible api on iOS?

查看:14
本文介绍了dyld`dyld_fatal_error,iOS 上不兼容的 api 的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的部分项目迁移到 iOS 5/ARC.最古老的项目之一(iOS 4.2,用于支持 iPod Touch 2g 的 armv6)正在给我:

I'm moving part of my projects to iOS 5 / ARC. One of the oldest project (iOS 4.2, armv6 for support iPod Touch 2g) is giving to me:

dyld`dyld_fatal_error:
0x8feb1070:  int3   
0x8feb1071:  nop    

就在启动图像之后,但在进入主之前.必须将一些库/代码更新到 iOS 5,但是哪一个?有可能使用比猜测更好的方法吗??

Just after the launch image but before going to main. Must be some lib/code updated to iOS 5, but which one? Is possible to use a better method than guess??

推荐答案

自己尝试重现这个问题 这个项目 使用 Xcode4.3.2 和 SDK iOS5.1.问题是 Xcode4.3.2 上的标准项目模板是为 iOS5 配置的,它有一些早期 iOS 版本不支持的功能.在我的例子中,GLKit 框架被引入,并且在我运行 iOS4.2 的 iPhone3G 上不受支持.我得到的错误和你的一样:

Ran to this problem myself trying to reproduce this project using Xcode4.3.2 with SDK iOS5.1. The issue was that the standard project template on Xcode4.3.2 configures for iOS5, which has some features that earlier iOS versions don't support. In my case, the GLKit Framework was being pulled in and was not supported on my iPhone3G running iOS4.2. The error I was getting was just like yours:

dyld`dyld_fatal_error:
0x2fe01080:  trap   
0x2fe01084:  mov    r0, r0

仔细查看控制台输出后,您可以看到导致应用崩溃的原因:

Upon closer review of the Console Output you can see what's causing the app to crash:

dyld: Library not loaded: /System/Library/Frameworks/GLKit.framework/GLKit
Referenced from: /var/mobile/Applications/A60A53B1-F87D-467D-BB0B-82C603049202/HiJackInTheBox.app/HiJackInTheBox
  Reason: image not found
(lldb) 

错误意味着在安装应用程序的目标上的 iOS 中找不到 GLKit 框架.该框架被拉入到 Project->BuildPhases->LinkBinaryWithLibraries 下的构建中.

The error meant that the GLKit framework was not found in the iOS resident on the target where the app was installed. The framework was being pulled into the build under Project->BuildPhases->LinkBinaryWithLibraries.

所以为了纠正这个问题,我需要删除 GLKit 框架和所有引用它的代码.然后构建成功并在目标设备上运行.希望这会有所帮助!

So to correct the problem I needed to remove the GLKit framework and all code making references to it. Then the build succeeded and ran on the target device. Hope this helps!

这篇关于dyld`dyld_fatal_error,iOS 上不兼容的 api 的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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