Xcode 5 - How to add a header search path and use GDataXMLNode

I am trying to use GDataXMLNode to parse an XML file. I follow the guide on this blog:

http://www.raywenderlich.com/725/xml-tutorial-for-ios-how-to-read-and-write-xml-documents-with-gdataxml

My problem is to add GDataXMLNode to my project and make it work. I have to do something with the configurations, add a header search path and a few other things, but every single example I found on the Internet is a previous version of Xcode. I am currently using Xcode 5 and I have tried everything (PLEASE prove that I am wrong), but nothing works as intended in this tutorial.

So any help regarding how I can do this and make it work along with my iOS project would be greatly appreciated. Let me know if I can explain everything I said.

+6
source share
2 answers

You must select "All" in the project settings to show all options, including "Header Search Paths" and "Other Linker Flags."

The image to show "All"

+34
source

It's quite simple, follow the instructions, but remember that GDataXMLNode does not support ARC. You can do the same instructions as Andrew. But I think that it should be located in a subproject, for example: Library.xcodeproj . If you want to organize your code formally.

First, create a Library.xcodeproject , add a GDataXMLNode. In Build Settings you also include the Header Search Path and Other Linker Flags. But do not forget that GDataXMLNode does not support ARC. Go to Build Phrases , under Compile Sources select the GDataXMlNode.m menu, set the compiler flag for it: -fno-objc-arc Compiler Flag for not approve ARC Now for any subproject that you want to use this library, just go to "Build Settings", in the "User" properties of the Header Search Path select: ../IPLibrary/** or ../IPLibrary and select the recursive option. Set header search path to use library Now you can enable GDataXMLNode. By the way, your project looks more professional, since lib and source code are separated separately. Good luck.

+1
source

Source: https://habr.com/ru/post/958680/


All Articles