in the last 4 hours I try to add Three20 to my iOS poject.
I try to avoid it a long time but now I am on a point in which i can't :)
So I added it correctly all to my projects and after around 2 hours of work it compile perfectly!!!
Badly, I got a "No such file or directory found"-error when try to
#import "Three20/Three20.h"
I try nearly every string in the "Header search paths" I can imagine to get this working, but I have no idea...
here is a screenshot of my directory listing:
http://i.stack.imgur.com/9yWjM.png
here is my Header search paths:
http://i.stack.imgur.com/uXEWP.png
What am I doing wrong?
Have you tried to add the three20 framework manually or using the included ttmodule.py script? The script usually takes care of everything. You can either import the framework into an old xcode3 or current xcode4 based project. The python script is located in src/scripts/
Short answer: everything. Three20 has a very clear documentation. Just follow the Adding Three20 to your project section from https://github.com/facebook/three20
At least for Xcode 4.2 and 4.3, you should do a previous step before you click on Product->Archive. This step is clicking on: Product -> Build for -> Build for archiving.
In USER_HEADER_SEARCH_PATHS in Build Setting under the Search Paths section add this:
$(BUILT_PRODUCTS_DIR)/../../three20
$(BUILT_PRODUCTS_DIR)/../three20
Related
So every time I update my app, Xcode claims not to be able to find a particular external framework even though it's there. It's happened again with Xcode 6 and my usual methods (I'm fairly inexperienced, so these basically involve clicking and typing things until something happens (I exaggerate but not by much)) aren't working.
I'm getting a Lexical or Preprocessor Issue error that says 'Parse/Parse.h' file not found.' But here are screenshots of it in the project and added to the library:
I also followed the steps in the most upvoted answer at ‘ld: warning: directory not found for option’ but still nothing.
Any idea what to do? Any idea at all? I'm tearing my hair out here.
Actually I was facing the same problem but after doing lots of (removing/adding parse framework) efforts I come to know that parse.framework is already added and error was still there.
Real Problem was not in link Binary for main project but it was with Tests link Binary.
Lets say your project name is "project1" and Xcode create one more folder with it called "project1Tests". So select "project1Tests" and add parse.framework in link Binary.
Check out the hierarchy:
PROJECT
project1
TARGETS
project1
project1Tests (you need to select this to add parse framework).
Hope this would help you resolve this issue.
I had this error also. I'm developing in Swift, so I added a "bridge header" as described in this Parse blog post.
The reason I got the "Parse.h not found" was that my project name contained spaces. (For project name I mean the Product Name you enter when creating a new project, which determines your folder's name.) The first day all went well, but after closing and opening Xcode, it turns out that Xcode interprets the words separated by spaces as different paths.
To fix this, you can go to Build Settings -> Search Paths -> Framework Search Paths and add an "\" before each space. (If you double click the path you'll see that Xcode shows each word separated by space as a different entry.)
Also note that the bridge header with #import <Parse/Parse.h> it's not compulsory: you can simply do import Parse.
All I had to do was remove Parse.framework from this list by highlighting and pressing delete.
Then I went down to the plus sign at the bottom of that list and had to select Add Other and manually locate the downloaded .framework file.
In my case, the error went away after I added the path to the directory where Parse.framework was to the Frameworks Search Paths Build Setting:
My project didn't even have an entry for that setting, so you may need to create it as well.
I had the same issue when upgrading parse to 1.4v. You have to delete Parse.framework from Framework List and from the project directory, when removed from both places copy again and check "Copy items to destination's group folder". It worked for me.
Its work for me.
Just go to Build Active Architecture Only and Debug should be yes and Release should be No
In my case I had to do one more thing additional to Sukhchais' answer.
It seems that though the parse.framework appears in the 'link Binary with Libraries' list for the targets, they might not have linked properly for some reason. Just remove parse.framework from the list and add it again as mentioned. By that way I was able to resolve my issue.
Just to Share my findings in case if somebody might have the same issue:
Accidentally we had two references of Parse.framework inside our source code base at two different places. And a reference of Parse.framework was linked in Build Phases of the target, from the first place. But when the app is compiled, Xcode was not smart enough to get a reference and trowed an error: "Lexical or Preprocessor Issue" error when "Parse/Parse.h" is imported in .pch file.
After spending couple of hours by trying various options, removed a reference of Parse.framework from the source base and kept only a single reference. This solved the issue.
And the app compiled successfully :)
For people coming from Ionic + Cordova if you are getting this error I solved it by removing my current parsePlugin and replacing it with this fork.
For simplicity, I used these console commands (Replace PARSE_APP_ID and PARSE_CLIENT_KEY with your keys in the Parse Console):
cordova plugin rm com.parse.cordova.core.pushPlugin
cordova plugin add https://github.com/grrrian/phonegap-parse-plugin --variable APP_ID=PARSE_APP_ID --variable CLIENT_KEY=PARSE_CLIENT_KEY
Ok, so I was having this problem as well. I uninstalled all my pods, reinstalled them again, and had no luck.
So the good news (and bad news considering the time I spent trying to find the problem) is that I eventually managed to solve it. Apparently, you have to import Foundation/Foundation.h before parse. I don't know whether this will work for you or not, but I tried everything on the net, and only this seemed to work. If you have any instances of this:
#import <Parse/Parse.h>
#import <Foundation/Foundation.h>
flip it around so that Foundation is declared first:
#import <Foundation/Foundation.h>
#import <Parse/Parse.h>
I also read somewhere that some people had issues with Facebook SDK and Parse SDK import. Apparently, the two have Bolt.Framework in common or something, which causes error. I removed Facebook SDK as well, which at first didn't make any difference. I hope I could help.
I get the error
GooglePlus/GooglePlus.h file not found
when I try to build the project. I just added the Google Plus framework into the project, and after that, I tried to import the framework in the app delegate.m file, but I’m just getting this error.
Drag and Drop the google-plus-ios-sdk-1.7.1 folder into Framework search path in Build Settings.
Its works fine for me.
I had the same problem, under "Build Settings > Search Path > Framework Search Paths" i had
$(inherited) non-recursive
$(PROJECT_DIR)/My non-recursive
Project/Frameworks non-recursive
i think spaces are breaking the directory path
changing it to $(PROJECT_DIR)/"My Project"/Frameworks solved my problem..
Take note that My Project is my project name, Frameworks is where my GooglePlus.bundle & .framework, in case yours contains spaces, adding quotation marks corrects it.. for example: $(PROJECT_DIR)/"My Project"/"Google Frameworks".
I think you have to remove current framework and bundle for Google plus and then download the latest one framework for Google plus from https://developers.google.com/+/mobile/ios/sdk/google-plus-ios-sdk-1.5.1.zip & add them from project's Build_Settings>Build_Phases.
This way i have solved my problem, may be u too can get it.
Thanks
K.D
I had the same problem and what got it fixed was removing the spaces from the names of parent folder(s) of the framework. With spaces in the names of parent folder(s), Xcode will show multiple directories in "Framework Search Paths".
And sorry, I could not add it as a comment as I don't have enough reputation.
One thing which I was missing adding
-ObjC in linker flag , but it did not removed the error.
Then I removed #import <GooglePlus/GooglePlus.h> from .pch file and added into my ViewController.h. It worked.
I had modified the path of Build Settings->Search Paths->Framework Search Paths to $(PROJECT_DIR)/yourProject/3rdParty/"Google API".
Here, it's important to add the quoter mark. If you miss the mark, then Xcode will know as $(PROJECT_DIR)/yourProject/3rdParty/"Google" and API.
Drug&Drop needed framework from Pods/Frameworks of your workspace to YourProject/Frameworks and select "Directory reference"
I am trying to use GDataXMLNode to parse an XML file. I am following the tutorial on this blog:
http://www.raywenderlich.com/725/xml-tutorial-for-ios-how-to-read-and-write-xml-documents-with-gdataxml
My problem is trying to add the GDataXMLNode to my project and getting it to work. I'm supposed to do something with the configurations, add a Header Search Path, and a few other things, but every single example I've found online is for a previous version of Xcode. I'm currently using Xcode 5 and I have tried everything (PLEASE prove me wrong), but nothing is working the way it's supposed to in this tutorial.
So, any help as to how I might go about this and get it working together with my iOS project would be much appreciated. Let me know if I can expound on anything I've said.
You should select "All" in Project Settings to show all the parameters, including "Header Search Paths" and "Other Linker Flags".
It's quite easy, follow instruction but remember that GDataXMLNode does not support ARC. You can do the same instruction as Andrey. But I think it should be located in a sub-project, for example: Library.xcodeproj. If you want to organize your code formally.
Firstly, create Library.xcodeproject, add GDataXMLNode. In Build Settings, you also include "Header Search Path" and "Other Linker Flags". But don't forget that GDataXMLNode does not support ARC. Go to Build Phrases, under Compile Sources menu look for GDataXMlNode.m set a Compiler Flag for it with: -fno-objc-arc
Now, for any sub-project you want to use this library, just go to Build Settings, in User Header Search Path properties choose: ../IPLibrary/** or ../IPLibrary and choose rescursive option.
Now you can include GDataXMLNode. By the way, your project looks more professional, due to lib and source code is split separately. Good luck.
Hi in my Xcode project I included libxml2.dylib framework. I am still getting a error:
libxml2/tree.h not found.
How to resolve this issue?
I didn't give any search header paths. I am using Xcode 4.2
In my own projects that use libxml2, I modified the Header Search paths to explicitly tell the compiler where to find the header files:
As you can tell from the "$(SDKROOT)" bit, it's actually built into the SDK that gets installed with Xcode.
change the Header Search Paths to this:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/libxml2
you are welcome :)
Read this documents.........i think this url is helpful for you....
see this topic in this url Setting up your project file
if you did not know header search path in Xcode , then follow step
go to target->click on BUild Setting-> search heder in search bar -> then you see search Path -> and check header search path
you go in Build Phase "Link with binary Libarys" and add libxml2 frame work
You follow all step after use step then click all tab (not combined tab)
I have similar issue and fix issue by following steps as per this article :
http://www.optimusmobility.com/2013/06/11/how-to-resolve-libxmltree-h-file-not-found-error/
THIS QUESTION REFERS TO RESTKIT 0.9.x.
IF YOU ARE NEW TO RESTKIT CONSIDER USING THE NEWER 0.10.x branch.
I recently inherited a project that uses restkit (restkit.org). I have started using a branch (402-new-build-process) that is more compatible with xcode4.2.
My project an all the example projects build and run, but when it comes to Archiving an app the build fails:
/Users/AUser/Documents/SubFolder/stable-branches/project-iOS-client/RestKit/Examples/RKTwitterCoreData/Classes/RKTwitterAppDelegate.m:9:9: fatal error: 'RestKit/RestKit.h' file not found [2]
#import <RestKit/RestKit.h>
^
1 error generated.
I have followed the Installation Troubleshooting guide on the project wiki, but this did not work.
As per Blake's answer I am building to the DerivedData directory:
In addition I have tried setting header search to these (in many combinations [just guesses]):
"$(BUILD_DIR)/RestKit/Build"
"$(SOURCE_ROOT)/RestKit/Build"
"$(SOURCE_ROOT)/../../Build"
"$(BUILD_DIR)/../../Build"
I think all these fixes were stabs in the dark, or at least felt like that to me. I half expected to read one about getting some hair from a young virgin and burning it over the Mac.
If it compiles for you in dev but not for archive its bound to be something simple. Or at least it was for me.
My source files were not in the right place:
The search header was set to "$(SOURCE_ROOT)/RestKit/Build"
But I had simply dragged the proj file from where I downloaded it into XCode. This was never an issue when compiling for debug etc. Just when archiving so I didnt spot it for a while.
Just make sure what ever that path is to the RestKit/Build is where the actual files are.
Fixed it for me, unlike all the cross your finger fixes I've read. Like moving headers into a group etc... what a load of rubbish that was.
Good luck, hope this helps. Thanks to the Restkit team, this really is a great framework.
Jamie
I am building against the development branch and integrate RestKit as a submodule in my root git folder
+ root project folder
|--+ RestKit
|--+ <Projectname>
|--+ <Projectname>.xcodeproj
So I use the following search paths
"$(BUILT_PRODUCTS_DIR)/../../Headers"
"$(SOURCE_ROOT)/../RestKit/Build"
!!!Update to the latest version of the branch!!!
I've just built RKCatalog and RKTwitterCoreData as an archive on Xcode 4.2 without issue. I am failing due to a Code Signing issue. Have you confirmed that you are building with the DerivedData directory:
RestKit assumes that you are using a modern Xcode project building to the DerivedData directory. Confirm your settings
via the "File" menu > "Project Settings...". On the "Build" tab within the sheet that opens, click the "Advanced..."
button and confirm that your "Build Location" is the "Derived Data Location".
I can push changes that rsync the headers to a known location, but I was hoping that standardizing on DerivedData would simplify the process.
To reiterate Jamie Reynolds answer, most (if not all) of you have set your header search paths to "$(SOURCE_ROOT)/RestKit/Build", this is fine while debugging and also fine for archiving, unless of course your Restkit framework IS actually in this directory.
Like the majority of you out there, you have probably just linked to the framework from the default download directory, in which case go to finder, open Restkit->Build cmd+i to see the info and select the directory path, copy and replace "$(SOURCE_ROOT)/RestKit/Build", dont forget the brackets.
mine was "/Users/edwin-b/Downloads/RestKit-RestKit-8d0d9fc/Build" worked like a charm
I followed the steps outlined in several SO answers, and the issue ended up being a problem with the Header Search Paths. Sometime between adding RestKit in XCode 4.2 and trying to archive in XCode 4.3.1 (I had updated twice between starting the project and providing a build), a comma had been injected in the Header Search Path list which Xcode could no longer parse. As a result, the entry for RestKit's header location was:
"$(SOURCE_ROOT)/RestKit/Build",
When it should have just been:
"$(SOURCE_ROOT)/RestKit/Build"
While this didn't produce any issues building to device or sim, once I tried to archive, it caused the error reported by the OP.
Just add "$(SOURCE_ROOT)/RestKit/Build" to you target "Header Search Paths", Thanks to this answer.
I'm sure some of these are redundant, but I just spent over 3 hours debugging this thing and almost ruined my project in the process. So... Here you have it.
For the sake of your sanity, create a zip backup of your project before messing with RestKit project paths, commit all files (especially the project) to source control, cross your fingers, burn a virgin hair over your mac, then proceed.
After eliminating them one by one, I narrowed it down to this line allowing me to archive.
"$(SOURCE_ROOT)/../RestKit/Build"
Restkit is a folder at the same level as the main project folder
I'm adding this answer so I can find it later - it matches some responses above. Look in your targets "Header Search Paths" - and depending on where your restkit directory is in your project, add one of the lines specified above in Alex Stones answer. In my case, it was "$(SOURCE_ROOT)/../RestKit/Build"