1

I have a large Xcode project which is 99% Objective-C and C code. I've just implemented the project's first Swift class.

When I pause the debugger and enter any command, I am greeted with this message:

error: in auto-import:
failed to get module 'Coventry_iPhone' from AST context:
error: /Users/ricky/Documents/Coventry/Config/Frameworks/iPhone/Coventry-iPhone-Bridging-Header.h:9:9: error: 'Silverlake-iPhone.h' file not found
#import "Silverlake-iPhone.h"
        ^

error: failed to import bridging header '/Users/ricky/Documents/Coventry/Config/Frameworks/iPhone/Coventry-iPhone-Bridging-Header.h'

Obviously something is wrong with importing a header file from another framework. Is there something akin to search paths I need to do with the debugger so it knows where to find this file? Or is the problem elsewhere?

Ricky
  • 3,101
  • 1
  • 25
  • 33
  • How did you import swift class in any Obj C file, can you show that import code – ankit Apr 27 '17 at 05:05
  • @ankit To do that I had to use `#import ` in my Objective-C implementation file. – Ricky Apr 27 '17 at 05:06
  • use # import "Appname-Swift.h" – ankit Apr 27 '17 at 05:07
  • @ankit We're in a framework so I have to use the target name. I tried using quotes (`#import "Coventry_iPhone/Coventry_iPhone-Swift.h"`) to no avail. – Ricky Apr 27 '17 at 05:12
  • Does `/Users/ricky/Documents/Coventry/Config/Frameworks/iPhone/Coventry-iPhone-Bridging-Header.h` exist? – shallowThought Apr 27 '17 at 08:35
  • @shallowThought Yes it does. I think it is just struggling with the first import statement in that file, as it belongs in another framework/project. – Ricky Apr 27 '17 at 23:45
  • http://stackoverflow.com/questions/1044360/import-using-angle-brackets-and-quote-marks – matt Apr 28 '17 at 00:59

1 Answers1

1

After extensive trial and error, I found that #import <Silverlake-iPhone.h> was the syntax that worked.

Ricky
  • 3,101
  • 1
  • 25
  • 33