1

I am new to Xcode and want to add and use framework which I have taken from internet but
when I add it to my products folder by right clicking on products and using add new files it runs fine and when i use my project's project.app file on my mac or on any other mac it gives me dyld error that the bundle image not find. And when I use bundle image in my framework folder its give me ld error that bundle not found help please.

ld: framework not found SMS-Bundled
 Command /Developer/usr/bin/clang failed with exit code 1

*updated

when i add my framework to framework folder now its giving me error at run time...

    dyld: Library not loaded: @executable_path/../Frameworks/SMS-Bundled.framework/Versions/A/SMS-Bundled
  Referenced from: /Users/usman/Library/Developer/Xcode/DerivedData/Serial_Tools-detoutxzbnjrngcuulrbgcasxmjs/Build/Products/Debug/Serial Tools.app/Contents/MacOS/Serial Tools
  Reason: image not found
6
  • Have you checked against copy resource into bundle when you added ? Commented Dec 24, 2013 at 6:26
  • what means please explain what are u saying sory i know this is silly question may b but i am new Commented Dec 24, 2013 at 6:32
  • this happens because this framework is not properly exported. You should manually Copy paste it inside your projects folder, then drag it from there. Then make sure the framework path in the project settings are set to relative within the project folder. Commented Dec 24, 2013 at 6:46
  • you means drag and then drop to framework folder?? Commented Dec 24, 2013 at 6:52
  • i have drag and drop it to framework folder but now its giving dyld error that image not found error which i have updated in my question Commented Dec 24, 2013 at 7:06

2 Answers 2

2

(In Finder)

Go to the folder where your custom framework is. copy the framework. Now go to your project's folder. Create a new folder called Frameworks, paste the custom framework inside this folder.

(In Xcode)

Drag the custom folder FROM finder to the Frameworks folder on the project explorer (where all the rest of the frameworks are)

Now select your project, go to Build Settings, scroll down to "Framework Search Paths" field, double click the value to open it, press the + to add a new path, write ./Frameworks as the new path.

From now on if you want to add other private/custom frameworks all you have to do is copy them into the created frameworks folder, and simply drag and drop it into the xcode frameworks folder. (You must drag it from the project framework folder in finder to the framework folder in xcode).

PD: You don't necessarily have to name this folder frameworks, it can be whatever, just make sure to change the Framework Search Paths accordingly.

Sign up to request clarification or add additional context in comments.

1 Comment

its still giving me this runtime error: Library not loaded: @executable_path/../Frameworks/SMS-Bundled.framework/Versions/A/SMS-Bundled Referenced from: /Users/usman/Library/Developer/Xcode/DerivedData/Serial_Tools-bnlbjumhuhbrhhbdeqsmfslolvil/Build/Products/Debug/Serial Tools.app/Contents/MacOS/Serial Tools Reason: image not found
0

In your project build setting, under "framework search paths" mention the path of the framework.

This will resolve your issue.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.