How to solve the errror "image not found"? - iphone

I am working on universal project(iPhone/iPad), in which the code that I used is same on iphone and ipad. The code is working well in iphone and not working in iPad.
It returns the following error.
dyld: Library not loaded: /System/Library/Frameworks/AssetsLibrary.framework/AssetsLibrary
Referenced from: /Users/mac/Library/Application Support/iPhone Simulator/3.2/Applications/AFE91FFD-27A4-41A9-B5AF-C4336F10A9F3/Move On Inspirational Quotes.app/Move On Inspirational Quotes
Reason: image not found
Can anyone please tell me how to solve this error.

As the AssetsLibrary framework is present only on iOS 4.0 and later, trying to run an application that uses it on earlier (i. e. 3.XX) iOSes will result in a crash. Either try eliminating the use of this framework from your application, or move on and support iOS 4.0 and later only.

Related

DYLD issue - "reason: image not found"

Weirdest SOB ever…
When i run my app on my iPhone it works perfectly. Also on lots of other iPhones. But when I try to run it on my friends iPhone (5.1.1), it starts and gets stuck immediately with the following error:
reason: image not found
Also it says it couldn't load Adsupport library. Could it be that 5.1.1 doesn't support Adsupport framework? Really?
Just solved it, although i would really like an answer. I deleted the Adsupport framework and now it works.
I don't know what image he was talking about… Really weird.
What framework does 5.1.1 use for such things?

Xcode Run Error dyld: Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics

tough one this.
Recently I added another target to my iPhone project to run a command line tool to create the initial database.
Since then, I started getting this error whilst running the iPhone project:
dyld: Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
Referenced from: /Users/mm/Apple Development/XCode Projects/GridTest1/build/Release-iphonesimulator/GridTest1.app/GridTest1
Reason: image not found
The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
The bizarre thing is that this library appears to be successfully loaded earlier.
Here's some debug output generated by dyld:
dyld: loaded: /Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
dyld: loaded: /Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/UIKit
Checking dyld environmental variables and of course whether the framework is actually present, everything looks good:
IPHONE_SIMULATOR_ROOT=/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
DYLD_ROOT_PATH=/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
Is CoreGraphics.framework here?... yes it is.
/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
To mystify things further:
App runs on device no problem either as release or debug.
Xcode 4 runs fine too either as release or debug.
Running in debug mode with a breakpoint set runs fine.
Fair enough you might say if it works ok in Xcode 4 why not just use that? Good point but you know how these problems can come back to haunt you. I don't want to leave this for now then it comes up again during submission.
Any advice would be greatly appreciated.
Btw I have searched countless lists and posts on this and related errors. I've also tried most of the advice there, e.g. restart Xcode, clean, etc. Unfortunately it didn't help.
Have been stuck on this for ages so some help would be awesome.
Cheers,
Max.
Did you start the project in XCode 3 (or earlier) and are now working with it in XCode 4? I cannot tell you the number of frustrations I've experienced with frameworks not referenced correctly as Apple has released new version of XCode over the past couple of years. The consensus seems to be to delete your project and create a new one in XCode 4. I have taken to manually editing the XML files before but in the end something weird just keeps happening. It may not be the "best" answer but should solve any odd framework referencing issues.
Thanks,
Rick

Referring external framework causing issue on device

I am using an external framework and where ever I am using the classes of the framework, I am getting the following error:
".objc_class_name_<FrameWorkClassName>", referenced from:
I checked the header search path and library path and I am giving the correct relative path there.
One important thing is that I am able to run the code on Simulator but it is creating issue on device.
Any clue will really help?
If it works on the simulator, then I would guess that the framework you are linking against is built for the simultator and not the device. The simulator uses the i386 architecture, while the device uses the arm architecture. Make sure you have a copy of it with the arm architecture.
As far as I know this error implies that the compiler is not able to find the referenced framework. Try cleaning all targets and make sure every framework you are using is added properly to the project. Which framework are you trying to use?

Load framework only when found (For example CoreTelephony.framework)

The application I'm currently developing needs to show the carrier name on a screen. I know how to achieved this with the CTCarrier class from iOS 4.0. But unfortunately my app needs to also run on the older system versions (back to iOS 3.0). This is a requirement I cannot change.
From the code this should not be a problem, as I can test if the class exists and only show the name when the app is running under 4.0. But the problem I have is that as soon as I link the CoreTelephony framework in my project the code cannot be run on a phone with an older system version. The app will crash with an error message:
dyld: Library not loaded: /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
Referenced from: /var/mobile/Applications/6F3E2582-0364-42F4-9A65-D98B40987509/XYZ.app/XYZ
Reason: image not found
Is there a way to only load the framework when it is found on the system? Or is this not possible.
In your project go to Target info / General tab / Linked libraries section - set type as weak for your framework there

dyld: Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit

Please bear with me, newbie just learning the ropes.
I am getting the below message, when I try and run my app, it quiets, but then does let me re-open fine after the first quit.
I tried a few things and if I turn on if i 'activate breakpoints' it all works fine...
Tried a few suggestions, 'deleting build folder', 'restarting xCode' nothing seems to work...
dyld: Library not loaded:
/System/Library/Frameworks/UIKit.framework/UIKit
Referenced from:
/Volumes/MyBook/Apps/CToolBox/build/Debug-iphonesimulator/CToolBox.app/CToolBox Reason: image not found
The Debugger has exited due to signal
5 (SIGTRAP).The Debugger has exited
due to signal 5 (SIGTRAP).
Thanks in advance.
Try this
Just delete your personal settings files for the project.Right click on .xcodeproj file and select show package contents .They will be username.mode1v3 and username.pbxuser. I didn’t figure out which file was the cause, but deleting them sorted it out.
One other way I found today is, turning the Framework (in this case UIKit) in question as "optional". I hope you know how to do that :)
PS. I still wanna know the real reason of this abnormal linking failure? my code was working perfectly till today!
It looks like its trying to find the UIKit Framework in the wrong location. It shouldn't be looking in system frameworks but in a path like this:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/System/Library/Frameworks/UIKit.framework
Get info on the UIKit framework within Xcode and see where it thinks the path to is at. If you installed in a non-standard location that might be your problem. You could also remove and readd the framework to try and change its path.
You should also check the configuration popup to make sure you're not trying to build for Cocoa.
You can also get this sort of error message trying to write a Mac OS app if you try to use a framework that's not available on your OS version, e.g. trying to write a MacOS SpriteKit app in Mountain Lion.