Custom frameworks dependency issue

Hello,


I just spent the better part of a work day trying to get our new XCode 6.4, 8.2 deployment, framework using, mixed langauge project setup. I am running into the following issue and I have no idea how to solve it.


Our frameworks are primarely Obj-C (Common, and Networking). Networking depends on Common. Both frameworks compile independently without error or warning. I am using the "@import Common" inside of Networking code. Doing it the old fashaioned "#include <Common/Common.h> was causing "framework search path warnings" and "non-modular-include" errors.


The new application project is Swift. Both frameworks are added as embedded frameworks. We can "import Common" in the code with no issue. As soon as we put in an "import Networking" the compiler then errors with "Networking cannot find module Common" from one of Networking's headers. Networking can find Common on its own. The Swift App can find Common on its own. But It cannot find Common from App through Networking!


What am I missing?


Cheers,

Dave

Have you made sure to update the framework search paths and enable modules for your frameworks from the build settings?

All things have modules enabled - triple checked thet yesterday :-)

And these are all brand new XCode-7 projects - no build settings cruft.

The @import is supposed to auto create framework search paths and link references on compilation.


If I were to add the search path manually, which path do I use? The ones in the build folder change.

The @import directive does not actually modify the search paths. Think about it for a moment—your code imports "Common." How does the compiler know what that is or where to find it? That's what the search paths are for. To add a custom framework, you'll want to add $(CONFIGURATION_BUILD_DIR) to the Header Search Paths build setting for your app. Check out the "Sharing Code Between iOS and OS X" video from WWDC 2014 for more information about setting up a custom framework in an app.

Why would it not modify search paths? Everything is in the same workspace. Building Networking works by simply specifying @import Common. Building the App with only @import Common works. It is when App @import Networking fails on the same import @Common that worked when I was building Networking independently. The succes cases has no custom search paths provided.

Custom frameworks dependency issue
 
 
Q