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
-
Have you checked against copy resource into bundle when you added ?βhargavḯ– βhargavḯ2013年12月24日 06:26:14 +00:00Commented 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 newmano– mano2013年12月24日 06:32:05 +00:00Commented 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.Pochi– Pochi2013年12月24日 06:46:42 +00:00Commented Dec 24, 2013 at 6:46
-
you means drag and then drop to framework folder??mano– mano2013年12月24日 06:52:48 +00:00Commented 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 questionmano– mano2013年12月24日 07:06:36 +00:00Commented Dec 24, 2013 at 7:06
2 Answers 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.
1 Comment
In your project build setting, under "framework search paths" mention the path of the framework.
This will resolve your issue.