I've been refactoring an existing app so that some of the objective-c can be re-used in a new app by creating a static library. I've never done this before so I followed the raywenderlich tutorial here
It all works OK except I don't get any header files in the products folder (as per the tutorial) This means that when I link the projects the compiler complains that the header files aren't found. My built project and the output folder are shown in the screen shot below:
I'm sure its something simple but I can't work out what I'm missing - any ideas would be appreciated
Related
I am new to WebRTC stuff. I cloned the webrtc_ios main branch, and I built the framework as instructed here with the python script for arm64. When I add this to my Xcode project as a framework, everything is fine. Project builds, I can import files using <WebRTC/...> syntax.
However, I need to use RTCMTLRendeder.h file. Building a framework with python script leaves some of the header files out. (When I take a look at WebRTC.h inside the built framework, I can see that this file is missing) How can I include all header files that actually exist inside /webrtc_ios/src/sdk/objc/components folder while building the framework? I can see RTCMTLRenderer.h and .mm files are in that folder before using the build script. When turned into a framework those files don't exist inside the framework anymore. Why? And is there any other way to actually copy those files into the project as well?
Turns out you need to create your own, long renderer class which does not inherit from RTCMTLRenderer at all if you want to render on Metal view manually in a Swift/ObjC hybrid project (at least this is how I solved it). That class does whatever RTCMTLRenderer does, and grabs pixel buffers from RTCVideoTrack through an RTCVideoView.
I'm having a problem getting the 'System Header Search Paths' in build settings to work in Xcode and allow me to use #import <Core/CoreBlocks.h> rather than a local copy and #import "CoreBlocks.h"
First I need to "frame" the problem.
I have built a framework that I use across many if not all my projects. This is Core.framework . Inside the framework is the requisite "Headers" directory and within that 40 other headers, all of which are included in the 41'st header Core.h
I drop the Core.framework into another project and the other project headers or source files then import:
#import <Core/Core.h>
and get all the functionality of the 40 modules in the framework. Works fine.
BUT, what I need is a simple way to run the 40 modules of Core.framework outside the framework construct, as a separate build or project, with just the source and breakpoints, so I can debug and enhance it.
I try to define the framework's source directory as a search path for the other project:
yet the compiler complains about the inability to find the headers in the source code:
is all I get for all of the imports even though they all reside in the lower Core directory below that path:
~/Development/Projects/Core/Core/Core/NSRange+Core.h
And that's where I'm at a loss. What am I doing wrong?
Found out why... Xcode for some reason can't use the *nix home directory notation in a pathname.
In other words while:
~/Development/Projects/Core/Core
does not work, the expanded equivalent:
/Users/BC/Development/Projects/Core/Core
does work in the Xcode system header search paths, yet it is not obvious as to why...
I'm having major issues trying to get Xcode to find any public header files in my Cocoa Touch framework project in Xcode 6. I have a very explicit folder structure within my framework project directory that goes something like this:
APIKit -> DataModels -> User -> APIUser.h
The "DataModels" directory is where I put all of my model objects and every object subtype will have its own sub-directory within DataModels (e.g. like APIUser above). Importing the above file in my APIKit.h header file looks like the following:
#import <APIKit/DataModels/User/APIUser.h>
However, for whatever reason, Xcode cannot find that dang file! Looking at my list of public headers from the project settings shows that the directory I outlined above is 100% correct. Does this make sense to anyone?
Update: Even #import <UIKit/UIKit.h> can't be found in my APIKit.h header file -- crazy!
don't forget to link the binaries in Xcode under build phases or are you saying xCode cannot find them in link section.
I'am a newcomer to cocoa developement and i have not yet got used to.
When use eclipse for java development, we can see all the added jars source file if we attached the source files.
But in xcode, we add a framework such as "Cocoa.framework",there is only one Cocoa.h file we can see.
eg:
I clone the 'Sonora' source code from github for study.
there is one line
#import "SNRFileCopyManager.h"
exist in SNRFileImportOperation.h file
Both the SNRFileImportOperation.h and SNRFileCopyManager.h can be found in Sonora/Classes directory.
But, i can see the SNRFileImportOperation.h file in xcode project only and they get work fine together, Why this non third party header file not display in it's own project?
I know something about the dependency setting adn header search paths.
Any one give me a guidance or some references of the code management|organization?
Thanks a lot.
The file SNRFileCopyManager.h is found because it is in one of the include search paths. If you select a header file in Xcode and look at the info panel on the right side you can see that it doesn't actually belong to any target, they are shown more or less regardless. Though, building a framework you can select header files to be included into the framework when building. So, you can just pull in your header files into Xcode.
I've been at this for a few days now and I can safely say I'm stumped and haven't made progress on my own. I'm attempting to compile a project included in the XCode documentation (SinSynth) but every time I attempt to build it, I get errors upon errors about missing header files. "Okay," I thought enthusiastically, "Take a deep breath and let's use this as an opportunity to better learn XCode."
I looked at the paths the compiler told me it was looking for the headers in, added them, and then got more warnings because files needed to reference one another in the same folder (This files were not the missing header files - they were other files included that had definitions and what looked like boiler plate code). At this point I was a bit confused as to why the headers weren't installed in the first place. I uninstalled and reinstalled XCode but still had the same errors.
My question is where do I need to put the header files and cpp files included in the Audio Tools for Mac download? This is my first time having to break open XCode and add content, and thus far I've found no newbie-friendly tutorials to help me with this. To say it bluntly, I'm confused! What should I do?