Reputation: 3438
I'm importing an Objective C project into my swift project. I've created the bridging header and set the path under Building Settings. I've set the Search Paths to the Header Files and the Library.
The issue is my Header files are not being found. When I build, the second line in the imports is not found:
#import "VuforiaObjects.h"
#import <Vuforia/Renderer.h>
#import <Vuforia/Trackable.h>
#import <Vuforia/TrackableResult.h>
If I rem out the second line, the project fails to build on the third line. Strangely, If I remove the word "Vuforia" from the import it is accepted and the next fails.
Thanks.
Upvotes: 2
Views: 1448
Reputation: 3438
I finally figured why I couldn't import the bridging-header file.
The path to the bridging-header in build settings was correct. However the paths specified by the file in the import statement in the header file where incorrect.
In the bridging-header:
#import "VuforiaManager.h"
The headers specified in VuforiaManager.h are:
#import "VuforiaObjects.h"
#import "VuforiaEAGLView.h"
Which in turn pointed to:
#import <Vuforia/State.h>
#import <Vuforia/Tool.h>
And here is where I went wrong... I thought the syntax for the import directive is:
#import <framework||library / headerfile>
when in fact the import in all of my headers are:
#import <folder / header file>
So the reason my bridging header wasn't importing was the search path to my header files included Vuforia folder when this was already included in the #import statements.
Upvotes: 2