WXGBridgeQ
WXGBridgeQ

Reputation: 31

Xcode 7 compile error, can't import Swift class in Objective-C files

I got a compile error with my old project, it used Objective-C and Swift 1.2, and Xcode will auto generate a file named "PROJECTNAME-Swift.h", I import this file in my AppDelegate. But when I open the project with Xcode 7, the import report an error. I have used the convert to the lastest Swift syntax.

Upvotes: 2

Views: 2486

Answers (2)

Raj Oriya
Raj Oriya

Reputation: 78

  1. Go to header search path and delete all the code from there after that add new by pressing + icon and from xcode drag and drop the path of your ProjectName-Bridging-Header and try

  2. Have you delete derived data ? if not then delete derived data and then clean+build your app

Upvotes: 0

JAY RAPARKA
JAY RAPARKA

Reputation: 1326

just try to change this

Under Build Settings, in Packaging, make sure the Defines Module setting for that framework target is set to Yes.

I hope this will help you.

Upvotes: 1

Related Questions