0

I am trying to add GCDWebServer to a Swift (1.2) project. I added the GCDWebFolder directory to my project as per the directions on the readme. Next, I added a bridging header:

// Demo-Bridging-Header.h

#import "GCDWebServer.h"
#import "GCDWebServerDataResponse.h"

I made sure that the project is configured to include the bridging header and I'm fairly certain it's being accounted for (If I purposefully add a typo to the bridging header, the project no longer builds).

In theory, that's all I need in order to make the GCDWebServer class available to Swift. However, if I try to use it, I get:

Use of unresolved identifier GCDWebServer

I'm not sure what I'm missing here. I've read about people using GCDWebServer in Swift projects, and there's also a reference to Swift in the readme. I can't think of a reason why Swift wouldn't see the class.

I'm using XCode 6.3 and my deployment target is iOS 8.0

0x6A75616E
  • 4,696
  • 2
  • 33
  • 57

1 Answers1

0

The solution was to make sure that the Bridging Header file was also added to the Target's "Objective-C Bridging Header" under Build Settings. The Project's value wasn't being inherited.

0x6A75616E
  • 4,696
  • 2
  • 33
  • 57