adding libraries manually to Xcode project - ios

I am trying to add a library "WeScan" to my Xcode project manually. I just downloaded the source file from GitHub and by drag and drop, added that we scan folder to my project. Then I tried to import that, but it is giving an error like
No such module 'WeScan'
And also this library is not adding with linkbinarywithlibraries.If anyone help's me would be great.Thanks in advance.
enter image description here

Notice the blue color of the WeScan folder in your project navigator. This tells you that you have added this folder as a folder reference. You can't do that with code files. Delete the WeScan folder from the project navigator and drag it in from the Finder again, and this time make it a group. Now the code files will be part of your project.

Related

Xcode not able to find project file

In my Xcode project there are other projects linked but somehow its not able to read the sub project.
As you can see MobiResourceManager.xcodeproj is shown in red. And thus the classes which uses headers inside it gives error. But I am not able to understand why its not able to show the project. Sometimes it doesn't show MobiResourceManager.xcodeproj in red but even then the classes using its header gives error of HeaderName.h not found.
The problem that I am facing is happening only in my system. I tried cleaning, deleting-installing Xcode, cloning the repository again but nothing works.
All the project file shown in the screen shot are sub project inside one main project.
Probably that red file was removed or moved somewhere else. Open Finder, locate the missing xcodeproj, then remove this one in Xcode and drag&drop the located one. If that red xcodeproj is inside your repository (what I suspect) then do not select to copy it to the destination.
If you cannot locate that red file, it means it is not added to the repository. For example, it could mean that you need to install it with git submodules or another way - depends on the project configuration.
Are you using the workspace? if yes then please open that file not xcode project file

App falsely reports missing file

I downloaded a git hub project, a screen recorder(ios). It said I had to also copy in Inappsettingskit, so I did. So I tried to run it on my iPod and it told me that IASKAppSettingsViewController.h and .m were missing, even though I checked, and they are there, in the correct folder.
All the files are there in the correct place. The only thing I am noticing is that the files are in red text in Xcode:
Sorry that I am such a noob. Any ideas on why these errors show up?
Just guessing here, but chances are something went wrong when you added the files to the project. Try this.-
Remove the files references from Project navigator
From finder, make sure the physical files are inside your project folder.
Drag the files from finder to Project navigator. Uncheck copy items into destination
Drag the recently added files from Project navigator to Build phases => Compile sources section

Unable to correctly import framework into xcode project

I'm trying to add KKGridView to my project. I've followed thier description from github as best I can:
Create a new workspace in Xcode in the same directory as your existing *.xcodeproj.
Drag in your existing Xcode project
Locate your copy of KKGridView, drag KKGridView.xcodeproj into the
workspace so that it stays at the top of the hierarchy, just like
your original project.
In the Build Phases section of your original project, link your
project with libKKGridView.a.
Now, simply import KKGridView just like an Apple framework:
But libKKGridView appears in red in my project, and I am unable to import any of the code with
#import <KKGridView/KKGridView.h>
Any ideas?
Copy this file physically to your folder,and then add file to xcode from there.Drag and drop create this problem sometimes.
Hope this helps you.
You need to import the .h files as well

XMPPFramework: trying to #import XMPP.h gives a "no such file or directory" error

Does anyone know how to set up the XMPPFramework for iphone?
I can't seem to figure this out despite the wikis, and the wikis look out of date.
My project compiles fine, but once I actually try to reference any of the framework's classes, I get a no such file or directory error when trying to build the project.
I have no idea what is wrong despite using a bare bones project to reduce any sources of error. I'm using Xcode 4.2
Appreciate any pointers.
Thanks!
Make sure that you DID NOT just drag and drop the XMPPFramework files into your project. Notice in the XMPPFramework wiki is says to copy the files into your project folder, and then add the files into your project. So, if your XCode project is called XMPPTest, there will be an XMPPTest folder wherever you created your project, as in /Users/johndoe/XMPPTest. Taking step 2 for example, you need to press the "option" key and drag the folder titled "CocoaLumberjack" into /Users/johndoe/XMPPTest. THEN you can drag the "CocoaLumberjack" folder inside /Users/johndoe/XMPPTest into your actual XCode project. When you do, you should be sure to check the box "Copy items into destination's group folder (if needed) and select the radio button "Create folder references for any added folders". You should make sure that the checkboxes inside the "Add to targets" box are checked.
There is no XMPPH.h file in XMPPFramework. You should include XMPP.h instead

Cocos2D file not found?

I downloaded cocos2d, the latest version. I added the folders 'cocos2d' 'cocosdenshion' 'external' 'cocoslive' and 'experimental' to my project folder, then I dragged them to my project without clicking add to destination group project button.
But when I build the project, I get an error: 'vorbis/ivorbiscodec.h' file not found in ivorbisfile_example.c on this line:
#include <vorbis/ivorbiscodec.h>
If I comment it out, then this line has the same type of warning:
#include <vorbis/ivorbisfile.h>
I can't comment that out otherwise there is like 50 errors!
Anyway, I look in the hierarchy of folder and the file is indeed there. I am not sure what the vorbis/ part is but the file ivorbiscodec.h is indeed in the project and in finder of the projects folder.
I deleted the Box2D and Chipmunk folders in the external folder in finder and in the project if that makes any difference.
Does anyone have any idea why I am getting this error?
Thanks!
Just to make something sure: Did you check 'Copy items to destinations group's folder (if needed)'?
I deleted the Box2D and Chipmunk folders in the external folder in finder and in the project if that makes any difference.
This statement then makes a lot of sense, because the files couldn't be located and it would throw the errors.
(You could also right click the files inside Xcode and hit Show in Finder to verify their existence.
But on a side note: Cocos2D comes with a install-templates.sh script that you can use to natively include some Cocos2D project templates in Xcode. I would recommend you to do that and create Cocos2D projects from inside Xcode as follows:

Resources