1

I currently have a bridging header set up and I want to add more files to it but when I do so I get a "file not found" error:

Error

I know the pod is set up correctly. I'm pretty sure my bridging header is set up correctly. I have it in the MyProject_Showcase-Bridging-Header.h format. It's been added to Targets - Swift Compiler Code Generation. It looks like the first item on the bridging header is working fine. I'm not sure why it can't find the 2nd one.

SwiftyJD
  • 5,257
  • 7
  • 41
  • 92

2 Answers2

1

It looks like your syntax is incorrect. Try replicating the top import.

Something like <fileDirectory/IQDropDownTextfield.h>

Joel Nieman
  • 746
  • 4
  • 13
  • I tried that, it causes more errors than just the file not found error – SwiftyJD Aug 16 '16 at 17:21
  • Is the framework saved correctly in your project directory? If it can't find it, it's likely that it's pointing to the wrong location. – Joel Nieman Aug 16 '16 at 17:26
  • It's from a pod. Would that affect it? – SwiftyJD Aug 16 '16 at 17:42
  • The framework should be in the top level of your directory, the same place your .xcodeproj file is. If it is saved another level down inside a directory name "Pods" or something of the like, you will need to include that with your import statement. Something like #import "Pods/IQDropDownTextField.h" – Joel Nieman Aug 16 '16 at 17:47
  • It's still giving the same error, I installed the pods using 'use_frameworks!' do you think that might have affected it – SwiftyJD Aug 16 '16 at 17:56
  • Are you using a static or dynamic framework? http://stackoverflow.com/questions/27899799/ios-static-vs-dynamic-frameworks-clarifications – Joel Nieman Aug 16 '16 at 18:03
  • 1
    I got it to work, your first answer was right, all the errors being thrown were because were related to how I had the project set up before using the pod. – SwiftyJD Aug 16 '16 at 18:07
0

Just type in the heather:

#import "file-to-import.h"
Otto Gutierrez
  • 447
  • 2
  • 5
  • 15