Which is the cause for dyld`dyld_fatal_error, a incompatible api on iOS?
Asked Answered
C

7

18

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    

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??

Calcific answered 26/4, 2012 at 0:6 Comment(1)
#24878774Zonate
G
25

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) 

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.

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!

Gaiety answered 2/6, 2012 at 17:20 Comment(3)
Yes, I confirm this happend when a IOS5 incompatible lib/call is in use in a IOS 4 deviceCalcific
How could you see the Library not loaded message? I am getting same error but cannot find the readable message.Tamratamsky
It was in the Console Output window. You can filter for the "dyld" string and see if that helps locate it.Gaiety
I
5

If you go to the Console Output you'll se an error telling which framework is missing in the device and causing the problem (like grundyoso said in his answer).

So in order to fix this you can go to the target's General tab and add the missing framework in the Embedded Binaries section.

This will copy the framework to the app so it will never be missed on any device.

Ionone answered 23/12, 2015 at 23:28 Comment(0)
P
2

I had the same issue and this happens when I was running the app on my iPhone 6s, and it was working before..

Just go to Product -> Clean and re run it again...

I hope this helps.

Preen answered 17/10, 2015 at 14:6 Comment(0)
F
2

I have the same issue with Reachability.framework. It worked fine for iPhone 5 but while run the same code for iPhone 7S Plus ,it show the error.

The solution for this problem is : 1. Go to General -> Embedded Binaries. 2. Add same framework (in my case Reachability.framework) 3. Then, add libc++.tbd in Linked Frameworks and Libraries.

Hope it work for you.

Firstborn answered 23/9, 2016 at 6:59 Comment(0)
E
1

I had the same problem with my xCode 4.3 (cocos3d based) project when I tested on an iPhone 3GS with iOS 4.2.

Go to your project settings and update:
Target(s) | Summary | Linked Frameworks and Libraries | GLKit.framework to Optional
(rather then Required) and then test again.

After make this change everything seems to hold together fine for me now.

Good luck!

Escapement answered 15/6, 2012 at 15:3 Comment(0)
P
0

If you are using Carthage you might have forgotten to add a framework to the "Copy Frameworks" Go to Target -> Build Phases -> Copy Frameworks -> Add the framework to the list.

Pirnot answered 5/4, 2016 at 1:38 Comment(0)
M
-1

It looks like your main target is linking to XCTest.framework but failed.

1) Go to Project settings -> 2) Go to your apps main target -> other linker flags 3) remove '-framework XCTest' 4) make sure the 'other linker flags' field for your test target still contains '-framework XCTest'

2) check Images.xcassets, and other resources, in file inspector (right panel), look at 'target membership', check if you select the Tests target.

3) try search XCTest in your project and see what you have set.

OR

Try to remove Tests

Muddle answered 15/8, 2015 at 11:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.