Can't find User Header Paths
I have a project that was previously running in XCode 7, under Swift 2.2. However, I started migrating it to Xcode 8 and Swift 2.3 (Swift 3 will come later). This is my first time migrating a project, so I'm fairly new to a lot of concepts.
I keep getting the following error: 'JBBarChartView.h'file not found.
This is how my project looks like (blurred out the unimportant parts for privacy reasons)
The blue arrow points to the Bridging Header. This is what my bridging header looks like:
and this here is my actual folder structure.
The important Header Files, such as the JBBarChartView.h, are inside the Vendor Folder. For some odd reason, Xcode simply cannot find the files, and thus fails to import the Bridging Header.
So far what I have tried is:
No matter what I try, for some odd reason Xcode can't find those headers. Does anybody have an idea what I could try?
This ../../${SRCROOT}
looks wrong - Very possibly you want ${SRCROOT}/../Vendor/
(or something close).
When you add that, it should expand the SRCROOT macro and show you the actual path being generated... Does that look correct?
For example, when I use:
${SRCROOT}/../Vendor/
I get:
/Users/DonMag/Source/TestProj/../Vendor/
Which would put my Vendor files that I'm looking for in:
/Users/DonMag/Source/Vendor/
My Steps to Resolve This:
Create a new FindMe.h
file in your project. Put #define FOUNDIT 1
in it. Add #include "FindMe.h"
to the top of AppDelegate.m
.
Add to didFinishLaunchingWithOptions:
#ifdef FOUNDIT
NSLog(@"Woo Hoo");
#endif
Naturally, that should compile and run without issue.
Next, delete the reference to FindMe.h from your project, and move FindMe.h up one folder level. Try to compile --- and you should get a "FindMe.h not found" error.
Add ${SRCROOT}
as a Header Search Path
Try to compile / run. That should work. If so...
Move FindMe.h up another folder level, and change Header Search Path
to ${SRCROOT}/../
. Compile/run --- should work.
Keep following that process - move .h
one level (up or down into a new folder), edit your Header Search Path
, build/run to confirm... until you've reached the target folder of your "Vendor" header files.
上一篇: 如何使用Linq to XML将XML保存在XML文件中?
下一篇: 找不到用户标题路径