LibXML2.dylib and Xcode4 - iphone

I just downloaded Xcode 4 and I cant seem to run my application as the MGTwitter... classes are complaining of a non inclusion error of LibXML2. I have imported it into the frameworks folder, and I have put the following in the header bit in the build settings
$(SDKROOT)/usr/include/libxml2
But I am still getting 65 errors.
Any ideas how to fix this?

Try this:
"$(SDK_DIR)"/usr/include/libxml2

LibXML2 library solved
Many confusion around this issue.
SOLUTION
if you have both Xcode 4.3.x & Xcode 4.5 in /Application folder
must add ONLY: /usr/include/libxml2 in Application TARGET > Header search path.
For this double click on the line, on little window click plus sign and write /usr/include/libxml2
nb - need also add libxml2.dylib to the framework. I use 2.2.7.3
hope help you

Always search user path mark it yes.
Then, remove all previous paths that you have defined manually.
Clean all target.
Analyze or build again.
This works for me.

If you click on "All" and "Combined" go down to the Search Paths section. Make sure you add $(SDK_DIR)/usr/include/libxml2 to the "Header Search Paths" section and not the "Library Search Paths" section.

You need to add also the framework libxml2.dylib

Make User Header Search paths empty and write
$(SDK_DIR)"/usr/include/libxml2
in Header Search paths which is above the Library Search Paths

I think the selected answer is better. However this one worked for me:
I just drag and drop.
I do not know why it works. It's how the old programmer do it. I suppose there should be a framework we can include and that should be fine?
Also other computers may not have file libxml2.dylib in that exact spot and things may go wrong.

Please try this one:
${SDK_DIR}/usr/include/libxml2

Get info on the target and go to the build tab
Add -lxml2 to the Other Linker Flags property
Add -I/usr/include/libxml2 to the Other C Flags property

I also faced this issue for xcode4.6 ,
i added libxml2.dylib
in header search path added :: "/usr/include/libxml2"
and added "AdSupport.framework" and its work for me.

You need to add "$(SDK_DIR)/usr/include/libxml2" in "Release" Category rather then in "Debug" Category under "Header Search Path" if you are putting it into a device.

Related

SDWebImage/UIImageView+WebCache.h File Not Found Error

I Integrated SDWebImage in my project , its work like a charm in my mac system but while i am sending my project to other mac system its showing error like SDWebImage/UIImageView+WebCache.h File Not Found but the same project working in my system .some time i i am also getting the same error in my mac system after running the project continuously for 2 to 3 days
i tried all the ways like changing path to  project>target>Build Settings>'header search paths>$(SOURCE_ROOT)/SDWebImage
also tried $(BUILT_PRODUCTS_DIR) -  In header search paths,
please give me the some suggestions to solve my problem
Thanks in Advance
its only because the added SDWebimaege in your project its only reference so add folder of SDWebimages demo project in your project folder
and i am configure SDwebimage like this way:-
you need to first right click on your project name:->add files to yourProject-> selected SDWebImageproject and add them
NOTE:- please do not check copy option
now click on project name in Your xcode going to build phases:->target dependencies:-> click on + button and add SDWebimage ARC
now select link binary with library click + button add libSDWebimageARC.a and again click + and add imageIO.framework and also add libxml2.dylib thats it
going to Build setting:->other link flag:-> add -ObjC
and header search path add this three item
1 /usr/include/libxml2
2 "$(OBJROOT)/UninstalledProducts/include"
3 "$(TARGET_BUILD_DIR)/usr/local/lib/include"
now build and run its working like smoothly cheers.... :)
just try heading this in your frameworks path as well:
$(SDKROOT)/Developer/Library/Frameworks

SDWebImage/UIImageView+WebCache.h file not found while archiving [duplicate]

I am fairly new to ios development - trying to use sdwebimage in my iphone project. I believe I completed all basic setups as required. But when I build, I get this error: No such file file or directory near this line:
#import "UIImageView+WebCache.h"
Yes I have added Target Dependencies
I have added libSDWebImage.a in Link Binary With Libraries
I have -all_load -ObjC in Other Linker Flags
I also tried the -force_load ${BUILT_PRODUCTS_DIR}/libSDWebImage.a (64bit mac)
My Use Header Search Paths is : $(BUILT_PRODUCTS_DIR)
I cleaned the project and rebuilt - but no use.
Build keeps failing. Again, XCode4 code completion "resolves" when I type #import "UI & hit "ctrl+space" which means the lib is visible to xcode. Any pointers will be super helpful. Thanks.
To add the needed header files to the build path do the following.
Select your project file
Select your target
Select Build settings
In the search box enter 'header search paths'
For the Release add "$(SOURCE_ROOT)/SDWebImage" (thats with quotes).
This will work when importing like this #import <SDWebImage/UIImageView+WebCache.h>
I also use SDWebImage.
In my experience I didn't do anything with the linker flags etc.
You only have to add the classes in your project and simply import the "UIImageView+WebCache.h" in your class' header like this:
#import "UIImageView+WebCache.h"
and if you want to use it on an UIImageView object, just use the method
setImageWithURL:placeholderImage:
you can refer to their github for more info
I just ran into this problem and have solved it.
The issue is that when you "drag" the SDWebImage xcode project to your project, Xcode only create a reference to point to those files needed. When you are in debug mode it's fine, it knows where to find those file. However, when you want to archive it (packing everything to be self-contained), it couldn't find it from your search path.
Although you have added $(BUILT_PRODUCTS_DIR) to your search path, but if the actual files that you downloaded are not physically located in your $(BUILT_PRODUCTS_DIR), then Xcode won't find them. This was the problem for me since my SDWebImage files were still sitting in my download folder.
What you want to do is:
1.Move the SDWebImage folders to a place where you won't accidentally delete it. Notice once you've done that, the SDWebImage project file will become red since it's physical location is moved. And it's wired that I could not delete that reference in Xcode, what I ended up doing is add that file again (choosing from the location where I just move it too). You will end up with a red SDWebImage.xcodeproj in your project navigator which you can not delete. It's very annoying but it won't affect anything.
2. If the location you move the SDWebImage stuff to is not in your $(BUILT_PRODUCTS_DIR), then you either move that inside $(BUILT_PRODUCTS_DIR) or as I do, add the path to Target -> Build Settings -> Search Paths -> User Header Search Paths.
Archive and it should work now.
I faced this same problem and was about to go crazy. Like Ravi, I followed the static installation instructions as closely as possible.
I saw the auto suggest for UIImageView+WebCache.h when I was typing #import, but it keeps throwing file not found.
In the end, it was this. In header search paths,
“$(BUILT_PRODUCTS_DIR)” - Wrong.
$(BUILT_PRODUCTS_DIR) - Right.
Embarrassed but now it's working right =)
I've been dealing with this problem for the past hour and noticed something that hasn't been mentioned: Make sure that when you up update header search paths that the "Recursive" option is selected! Otherwise the compiler will not check subfolders.
Worked for me...
I was dealing with the same problem, my two frameworks were not getting found. I tried all the suggested ways in order to resolve the error but it couldnt help. Atlast I deleted the frameworks from my project structure and reloaded them from the original project file and it worked!! Please try this if it helps, It worked for me...
I had a similar issue after pod update. If you are using CocoaPods version higher than 1.0.0 and more than one target in your project, you have to add all the targets into the Podfile.

Symbols not found for architecture i386?

basically I've added the EGOTableViewPullRefresh files into my project. The code that I've written should work. However, 2 errors come up when that is triggered by the code in the viewDidLoad.
The Error looks like this:
What seems to be the problem and how can I fix it?
Thanks.
Make sure you are importing the correct headers and that the implementation files are linked to your Target.
let me tell you ,first enter project->build phases, now ,you can find the dir of Compling sources
,enter into it ,you can't find the EGOREF......m,now add the .m into it ,build and run !

Delete by mistake the storyboard

I delete the storyboard by mistake from my app.
Where I can find it and restore it,
or I lost it?
The default storyboard filename is Main.storyboard, so that's what you should look for unless you gave it a different name. (Older versions named it MainStoryboard.storyboard, so if you are working on an older project, you might need to look for that instead.)
First, check your project folder (using the Finder). If it's there, you can drag it back into your project in Xcode, or you can use the “Add Files to …” menu option.
If it's not there, check the trash can. If it's there, you can right-click it and choose “Put Back”, then follow the steps in the previous paragraph.
Try running again your app and Xcode will create the file automatically, this worked for me.

Adding CorePlot to iPhone Project - Errors?

Linker information below
Followed the directions.
Any ideas on how to fix?
Followed directions for install. I'm using Xcode 4.0.
Thanks, J
Did you follow the instructions? Make sure you add -ObjC -all_load -lCorePlot to Other Linker Flags.
Rechecked instructions and dragged CorePlot-CocoaTouch.xcodeproj into project properly. Solved the problem. Hope this helps someone else ;)
You need to include Foundation.framework in your "deleteTest" target. Select it then go to "Build Phases", you will see one of the phases as "Link Binaries and Libraries", expand this and click the + sign in the bottom left of this list. Add the Framework from this list.
There I found a good link for using Core-Plot having detailed explaining how to add it to project & use the delegate method of Core-Plot.
http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application
It worked g8 for me. Hope you would be able to do the same ,yesterday only I did the same thing from here.

Categories