Using XCode 7. Have an app that uses a 3rd party framework (old style xxx.framework, not post-iOS8 dynamic frameworks). Host app includes the framework files using the syntax
<MyExternalFrameworkNameHere/SomeFile.h>
and builds fine. I can #include using (quote-style) files from the host app that do not use any external frameworks in the unit test target .m file and the test target builds just fine. However when the test target references a file from the host app that itself includes a 3rd party framework the test target fails to build saying it can't find the header. Example:
Host app header named SomeHeader.h:
#include <UIKit/UIKit.h> // OK
#include <MyExternalFrameworkNameHere/SomeFile.h> // doesn't like this in test target
XCTest target AppTests.m:
#include "SomeHeader.h" //fails saying it cant find MyExternalFrameworkNameHere/SomeFile.h
If the test target directly includes the offending external framework file like this:
#include <SomeFile.h>
It works, but that doesn't help as I need to test the host app code that uses the framework, not the framework itself. What am I doing wrong here? I've tried adding the external framework to the test target's Link with binaries... but that didn't help.
Aucun commentaire:
Enregistrer un commentaire