Xcode 8 - Can't Find User Title Paths

I have a project that was previously launched in XCode 7 under Swift 2.2. However, I started porting it to Xcode 8 and Swift 2.3 (Swift 3 will come later). This is my first project migration, so I'm pretty new to a lot of concepts.

I keep getting the following error: 'JBBarChartView.h'file not found.

This is what my project looks like (blurs non-essential parts for privacy reasons)

enter image description here

The blue arrow points to the bridge header. This is what my heading title looks like:enter image description here

and this is my actual folder structure. enter image description here

Important header files like JBBarChartView.h are inside the provider folder. For some odd reason, Xcode simply cannot find the files and therefore cannot import the Bridging header.

So far I have tried:

  • For the related purpose, I have installed Swift Compiler - General> Objective-C Bridging Header to the correct location.
  • I have set the header search paths for the target ../../$ {SRCROOT} and recursive.
  • I also selected YES in Always look for user paths
  • And my search paths for user titles are also: ../../$ {SRCROOT} and are recursive. (manually, in my build settings)
  • I also have an xconfig file that looks like this: HEADER_SEARCH_PATHS = "../$(SRCROOT)/**" (among other things, but they are all separated by a space.)
  • I cleared the DerivedData folder too much and restarted Xcode several times.

No matter what I try, for some odd reason Xcode can't find these headers. Does anyone know what I can try?

+3


source to share


1 answer


This one ../../${SRCROOT}

looks wrong - maybe you want ${SRCROOT}/../Vendor/

(or something close).

When you add this, it should expand the SRCROOT macro and show you what the actual path will be generated ... Does it look correct?

For example, when I use:

${SRCROOT}/../Vendor/

      

I get:

/Users/DonMag/Source/TestProj/../Vendor/

      

To put my Vendor files I'm looking for in:

/Users/DonMag/Source/Vendor/

      


My steps to solve this problem:



Create a new FindMe.h

file in your project. Place #define FOUNDIT 1

in it. Add #include "FindMe.h"

to the beginning AppDelegate.m

.

Add to doneFinishLaunchingWithOptions:

#ifdef FOUNDIT
    NSLog(@"Woo Hoo");
#endif

      

Naturally, compiling and running without problems.

Then remove the link to FindMe.h from your project and move FindMe.h one folder level. Try compiling --- and you should get a "FindMe.h not found" error.

Add ${SRCROOT}

asHeader Search Path

Try compiling / running. This one should work. If so...

Move FindMe.h to another folder level and change Header Search Path

to ${SRCROOT}/../

. Compiling / running --- should work.

Watch this process - move .h

one level (up or down to a new folder), edit Header Search Path

, build / run to confirm ... until you reach the target folder of your "vendor" "header files.

0


source







All Articles